Merge pull request #5075 from keymanapp/fix/web/popup-key-positioning

fix(web): position popups correctly in landscape mode on Android and during Chrome emulation
This commit is contained in:
Joshua Horton 2021-05-17 08:16:24 +07:00 committed by GitHub
commit 2c4ce9c687
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1789,8 +1789,8 @@ namespace com.keyman.osk {
// And correct its position with respect to that element
ss=subKeys.style;
var x=dom.Utils.getAbsoluteX(e)+0.5*(e.offsetWidth-subKeys.offsetWidth), y,
xMax=(util.landscapeView()?screen.height:screen.width)-subKeys.offsetWidth;
var x = dom.Utils.getAbsoluteX(e)+0.5*(e.offsetWidth-subKeys.offsetWidth);
var xMax = keyman.osk.getWidth() - subKeys.offsetWidth;
if(x > xMax) {
x=xMax;