fix(web): output base key if subkey touch returns to it (in-browser)

This commit is contained in:
jahorton 2021-06-23 13:14:54 +07:00
parent aab0eb94e2
commit 625b5fd8c8

View file

@ -236,6 +236,7 @@ namespace com.keyman.osk.browser {
updateTouch(touch: Touch) {
this.currentSelection = null;
let matchFound = false;
for(let i=0; i < this.baseKey['subKeys'].length; i++) {
try {
@ -245,10 +246,17 @@ namespace com.keyman.osk.browser {
if(onKey) {
this.baseKey.key.highlight(false);
this.currentSelection = sk;
matchFound = true;
}
sk.key.highlight(onKey);
} catch(ex){}
}
// Use the popup duplicate of the base key if a phone with a visible popup array
if(!matchFound && this.baseKey.key.isUnderTouch(touch)) {
this.baseKey.key.highlight(true);
this.currentSelection = this.baseKey;
}
}
}
}