From 9e046b6ffb2716bb03bf64cd6666cbe65027913a Mon Sep 17 00:00:00 2001 From: jahorton Date: Wed, 8 Jan 2020 10:36:16 +0700 Subject: [PATCH] fix(web): Prevents infinite loop (w timeout) for ui init when embedded --- web/source/kmwdom.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/source/kmwdom.ts b/web/source/kmwdom.ts index ad4c05f533..370e663a98 100644 --- a/web/source/kmwdom.ts +++ b/web/source/kmwdom.ts @@ -1631,6 +1631,10 @@ namespace com.keyman { // Display the OSK (again) if enabled, in order to set its position correctly after // adding the UI to the page this.keyman.osk._Show(); + } else if(this.keyman.isEmbedded) { + // UI modules aren't utilized in embedded mode. There's nothing to init, so we simply + // return instead of waiting for a UI module that will never come. + return; } else { window.setTimeout(this.initializeUI.bind(this),1000); }