mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-26 07:47:47 +00:00
chore: avoid error when running in unit tests
This commit is contained in:
parent
09a7e19913
commit
22cd0e2675
1 changed files with 3 additions and 3 deletions
|
|
@ -2578,9 +2578,9 @@ namespace com.keyman.osk {
|
|||
}
|
||||
|
||||
let r = key.getClientRects()[0];
|
||||
let xLeft = r.left,
|
||||
xWidth = r.width,
|
||||
xHeight = r.height,
|
||||
let xLeft = r ? r.left : dom.Utils.getAbsoluteX(key),
|
||||
xWidth = r ? r.width : key.offsetWidth,
|
||||
xHeight = r ? r.height : key.offsetHeight,
|
||||
previewFontScale = 1.8;
|
||||
|
||||
// Canvas dimensions must be set explicitly to prevent clipping
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue