Merge pull request #2622 from keymanapp/fix/web/2595-toggle-ui-error

fix(web): patches Float and Toggle UI issues
This commit is contained in:
Joshua Horton 2020-02-11 10:22:00 +07:00 committed by GitHub
commit 0ee1136f80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -127,7 +127,7 @@ if(!window['keyman']['ui']['name']) {
// Check required interface alignment and default keyboard
var opt=util['getOption']('ui'),dfltKeyboard='English';
if(typeof(opt) == 'object')
if(opt && typeof(opt) == 'object')
{
if(typeof(opt['position']) == 'string' && opt['position'] == 'right')
ui.floatRight = true;
@ -484,7 +484,7 @@ if(!window['keyman']['ui']['name']) {
keymanweb['addEventListener']('controlfocused',
function(params)
{
if(params['activeControl'] == null || params['activeControl']['LEnabled'])
if(params['activeControl'] == null || params['activeControl']['_kmwAttachment'])
{
/*if(keymanweb._IsIEEditableIframe(Ltarg))
Ltarg = Ltarg.ownerDocument.parentWindow.frameElement;

View file

@ -596,6 +596,11 @@ if(!window['keyman']['ui']['name']) {
_k.className='selected'; ui.selectedMenuItem=_k;
}
// Occurs for desktop form-factors when no keyboard (aka the sys default) is active.
if(!ui.oskButton) {
return;
}
// Hide the OSK button for CJK keyboards (or non-mapped)
if(lgCode=='cmn' || lgCode=='jpn' || lgCode=='kor')
{