Skip to content

Commit 509222e

Browse files
committed
MOBILE-3039 rte: Fix height calculation in Android
1 parent 240f425 commit 509222e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/rich-text-editor/rich-text-editor.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,10 @@ export class CoreRichTextEditorComponent implements AfterContentInit, OnDestroy
148148
// Editor is ready, adjust Height if needed.
149149
let height;
150150

151-
if (this.platform.is('ios') && this.kbHeight > 0) {
151+
if (this.platform.is('android')) {
152+
// Android, ignore keyboard height because web view is resized.
153+
height = this.domUtils.getContentHeight(this.content) - this.getSurroundingHeight(this.element);
154+
} else if (this.platform.is('ios') && this.kbHeight > 0) {
152155
// Keyboard open in iOS.
153156
// In this case, the header disappears or is scrollable, so we need to adjust the calculations.
154157
height = window.innerHeight - this.getSurroundingHeight(this.element);

0 commit comments

Comments
 (0)