From 11cdb0fffe0ce68ba66d8ccdfd40dafc67dc1054 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Wed, 16 Mar 2022 16:37:58 +0100 Subject: [PATCH] MOBILE-3833 core: Wait for visible RTE content --- .../editor/components/rich-text-editor/rich-text-editor.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/features/editor/components/rich-text-editor/rich-text-editor.ts b/src/core/features/editor/components/rich-text-editor/rich-text-editor.ts index 18a9760fb..07bf8b799 100644 --- a/src/core/features/editor/components/rich-text-editor/rich-text-editor.ts +++ b/src/core/features/editor/components/rich-text-editor/rich-text-editor.ts @@ -176,6 +176,8 @@ export class CoreEditorRichTextEditorComponent implements OnInit, AfterContentIn this.editorElement.oninput = this.onChange.bind(this); this.editorElement.onkeydown = this.moveCursor.bind(this); + await CoreDomUtils.waitToBeVisible(this.editorElement); + // Use paragraph on enter. document.execCommand('DefaultParagraphSeparator', false, 'p');