From 032f618d3368068bfb81cc8c8ed64dcfbcb0f207 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Thu, 25 Jan 2024 11:59:30 +0700 Subject: [PATCH] fix(web): touch-layout fontsize property use --- web/src/engine/osk/src/visualKeyboard.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/src/engine/osk/src/visualKeyboard.ts b/web/src/engine/osk/src/visualKeyboard.ts index 3bed7075e2..e9bdd32608 100644 --- a/web/src/engine/osk/src/visualKeyboard.ts +++ b/web/src/engine/osk/src/visualKeyboard.ts @@ -1232,17 +1232,15 @@ export default class VisualKeyboard extends EventEmitter implements Ke paddedHeight = this.computedAdjustedOskHeight(this.height); } - let b = this.layerGroup.element as HTMLElement; let gs = this.kbdDiv.style; - let bs = b.style; if (this.usesFixedHeightScaling && this.height) { // Sets the layer group to the correct height. gs.height = gs.maxHeight = this.height + 'px'; } - // The font-scaling applied on the layer group. - gs.fontSize = this.fontSize.styleString; - bs.fontSize = ParsedLengthStyle.forScalar(fs).styleString; + // The font-scaling applied by default for this instance on its root element. + // Layer-group font-scaling is applied separately. + gs.fontSize = this.fontSize.scaledBy(fs).styleString; // Step 1: have the necessary conditions been met? const fixedSize = this.width && this.height;