MOBILE-3039 rte: Fix height calculation in Android

main
Albert Gasset 2019-05-31 12:47:49 +02:00
parent 240f425d97
commit 509222e2d2
1 changed files with 4 additions and 1 deletions

View File

@ -148,7 +148,10 @@ export class CoreRichTextEditorComponent implements AfterContentInit, OnDestroy
// Editor is ready, adjust Height if needed. // Editor is ready, adjust Height if needed.
let height; let height;
if (this.platform.is('ios') && this.kbHeight > 0) { if (this.platform.is('android')) {
// Android, ignore keyboard height because web view is resized.
height = this.domUtils.getContentHeight(this.content) - this.getSurroundingHeight(this.element);
} else if (this.platform.is('ios') && this.kbHeight > 0) {
// Keyboard open in iOS. // Keyboard open in iOS.
// In this case, the header disappears or is scrollable, so we need to adjust the calculations. // In this case, the header disappears or is scrollable, so we need to adjust the calculations.
height = window.innerHeight - this.getSurroundingHeight(this.element); height = window.innerHeight - this.getSurroundingHeight(this.element);