cordova-plugin-wkwebview-engine
cordova-plugin-wkwebview-engine copied to clipboard
No scrollbar when content height is expanded async
I have found that scrollbars are not visible if content height is expanded async.
This example should explain the issue:
home.ts
import {Component} from '@angular/core';
@Component({
templateUrl: 'build/pages/home/home.html'
})
export class HomePage {
public items: string[] = [];
public constructor() {
this._generateItems(); // List has scrollbar
// setTimeout(() => this._generateItems(), 1000); // List has no scrollbar
}
protected _generateItems(): void {
for (let i = 1; i <= 100; i++) {
this.items.push(`Item ${i}`);
}
}
}
home.html
<ion-header>
<ion-navbar>
<ion-title>Home</ion-title>
</ion-navbar>
</ion-header>
<ion-content class="home">
<ion-list>
<ion-item *ngFor="let item of items">
{{item}}
</ion-item>
</ion-list>
</ion-content>