mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-13 12:19:25 +00:00
fix(web): tablet preview positioning
This commit is contained in:
parent
32e7d9a5d7
commit
b960cb03ac
2 changed files with 7 additions and 2 deletions
|
|
@ -54,7 +54,10 @@ export class TabletKeyTip implements KeyTipInterface {
|
|||
// decent null-guard check.
|
||||
if(on && key?.offsetParent) {
|
||||
// May need adjustment for borders if ever enabled for the desktop form-factor target.
|
||||
const hostRect = this.vkbd.element.getBoundingClientRect();
|
||||
|
||||
// Note: this.vkbd does not set relative or absolute positioning. Nearest positioned
|
||||
// ancestor = the OSKView's _Box, accessible as this.vkbd.topContainer.
|
||||
const hostRect = this.vkbd.topContainer.getBoundingClientRect();
|
||||
const keyRect = key.getBoundingClientRect();
|
||||
|
||||
// Used to apply box-shadow overlay styling when the preview is for a key on a layer not
|
||||
|
|
|
|||
|
|
@ -44,7 +44,9 @@
|
|||
kmw.addKeyboards({id:'lao_2008_basic',name:'Lao',languages:{id:'lo',name:'Lao'}, filename:'../lao_2008_basic-1.2.js'});
|
||||
kmw.addKeyboards('sil_euro_latin@en');
|
||||
kmw.addKeyboards({id:'ye_old_ten_key',name:'Classic 10-key',languages:{id:'en',name:'English'},
|
||||
filename:('../keyboards/ye_old_ten_key/build/ye_old_ten_key.js')})
|
||||
filename:('../keyboards/ye_old_ten_key/build/ye_old_ten_key.js')});
|
||||
kmw.addKeyboards({id:'gesture_prototyping',name:'Gesture prototyping',languages:{id:'en',name:'English'},
|
||||
filename:('../keyboards/gesture_prototyping/build/gesture_prototyping.js')})
|
||||
|
||||
var pageRef = (window.location.protocol == 'file:')
|
||||
? window.location.href.substr(0, window.location.href.lastIndexOf('/')+1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue