diff --git a/web/source/osk/visualKeyboard.ts b/web/source/osk/visualKeyboard.ts index 3870e441d2..5db2331f84 100644 --- a/web/source/osk/visualKeyboard.ts +++ b/web/source/osk/visualKeyboard.ts @@ -1789,8 +1789,12 @@ 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); + + // https://stackoverflow.com/questions/28083715/how-to-detect-if-a-mobile-device-is-emulated-by-google-chrome + // (Note the last reply to the accepted answer.) + var flipScreenDims = util.landscapeView() && util.device.OS == 'iOS' && navigator.maxTouchPoints !== 1; + var xMax= (flipScreenDims ? screen.height : screen.width) - subKeys.offsetWidth; if(x > xMax) { x=xMax;