Merge pull request #2476 from keymanapp/fix/web/initializeUI-infinite-looping

fix(web): Prevents infinite loop (w timeout) for ui init when embedded
This commit is contained in:
Joshua Horton 2020-01-08 13:00:36 +07:00 • committed by GitHub
commit 65fd8f5ac6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}