Skip to content

Commit

Permalink
Merge pull request #10504 from keymanapp/fix/web/layout-fontsize
Browse files Browse the repository at this point in the history
fix(web): touch-layout fontsize property use ⛲
  • Loading branch information
jahorton authored Jan 26, 2024
2 parents 7d999ee + 032f618 commit 5c5f5ac
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions web/src/engine/osk/src/visualKeyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1232,17 +1232,15 @@ export default class VisualKeyboard extends EventEmitter<EventMap> 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;
Expand Down

0 comments on commit 5c5f5ac

Please sign in to comment.