From 2f1237e3523b1fa8bcafb31e9794e8c9897350a7 Mon Sep 17 00:00:00 2001 From: jahorton Date: Wed, 25 May 2022 15:12:25 +0700 Subject: [PATCH] fix(web): osk shrinkage from rounding --- web/source/osk/anchoredOskView.ts | 2 +- web/source/osk/visualKeyboard.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/source/osk/anchoredOskView.ts b/web/source/osk/anchoredOskView.ts index 64d61e4d81..3acab69a45 100644 --- a/web/source/osk/anchoredOskView.ts +++ b/web/source/osk/anchoredOskView.ts @@ -62,7 +62,7 @@ namespace com.keyman.osk { protected postKeyboardLoad() { // Initializes the size of a touch keyboard. if(this.vkbd && this.device.touchable) { - let targetOSKHeight = this.vkbd.computedAdjustedOskHeight(this.getDefaultKeyboardHeight()); + let targetOSKHeight = this.getDefaultKeyboardHeight(); this.setSize(this.getDefaultWidth(), targetOSKHeight + this.banner.height); } diff --git a/web/source/osk/visualKeyboard.ts b/web/source/osk/visualKeyboard.ts index cc6ea3c416..c328ebc12c 100644 --- a/web/source/osk/visualKeyboard.ts +++ b/web/source/osk/visualKeyboard.ts @@ -366,7 +366,7 @@ namespace com.keyman.osk { * of alternate keystroke sequences. * @param input The input coordinate of the event that led to use of this function * @param keySpec The spec of the key directly triggered by the input event. May be for a subkey. - * @returns + * @returns */ getTouchProbabilities(input: InputEventCoordinate, keySpec?: keyboards.ActiveKey): text.KeyDistribution { let keyman = com.keyman.singleton; @@ -1235,9 +1235,9 @@ namespace com.keyman.osk { let b = this.layerGroup.element as HTMLElement; let gs = this.kbdDiv.style; let bs = b.style; - if (this.usesFixedHeightScaling) { + if (this.usesFixedHeightScaling && this.height) { // Sets the layer group to the correct height. - gs.height = gs.maxHeight = paddedHeight + 'px'; + gs.height = gs.maxHeight = this.height + 'px'; } // The font-scaling applied on the layer group.