fix(web): Remove base key from popup keys

This commit is contained in:
Darcy Wong 2020-10-19 10:05:31 +07:00
parent 4c839fa0de
commit bd2b87f5c0
2 changed files with 4 additions and 9 deletions

View file

@ -40,7 +40,7 @@ namespace com.keyman.osk {
}
};
// iOS now relies upon native-mode popup key management, so we only implement these hybrid-targetted
// iOS now relies upon native-mode popup key management, so we only implement these hybrid-targeted
// methods when embedding in Android.
let device = com.keyman.singleton.util.device;
@ -56,10 +56,8 @@ namespace com.keyman.osk {
if(key['subKeys'] && (typeof(window['oskCreatePopup']) == 'function')) {
var xBase = dom.Utils.getAbsoluteX(key) - dom.Utils.getAbsoluteX(this.kbdDiv) + key.offsetWidth/2,
yBase = dom.Utils.getAbsoluteY(key);
if(util.device.formFactor == 'phone') {
this.prependBaseKey(key);
}
// No longer prepend base key to subkey array
this.popupBaseKey = key;
this.popupPending=true;

View file

@ -1509,10 +1509,7 @@ namespace com.keyman.osk {
subKeys.id='kmw-popup-keys';
this.popupBaseKey = e;
// Does the popup array include the base key? *** condition for phone only ***
if(device.formFactor == 'phone') {
this.prependBaseKey(e);
}
// No longer prepend base key to popup array
// Must set position dynamically, not in CSS
var ss=subKeys.style;