Update popup positioning after using keyboard shortcut #4
This commit is contained in:
parent
99db143007
commit
0f2fa218f3
@ -331,7 +331,7 @@ class BesService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called to report tab event
|
* Called to report keydown event
|
||||||
*
|
*
|
||||||
* @param {Event} e
|
* @param {Event} e
|
||||||
*/
|
*/
|
||||||
@ -1187,7 +1187,10 @@ class BesService {
|
|||||||
BesPopup.clearReplacements()
|
BesPopup.clearReplacements()
|
||||||
popup.setContent(el, match, this, this.isContentEditable())
|
popup.setContent(el, match, this, this.isContentEditable())
|
||||||
this.highlightMistake(match)
|
this.highlightMistake(match)
|
||||||
popup.show(match.highlights[0].x, match.highlights[0].y)
|
match.highlights.forEach(el => {
|
||||||
|
const clientY = `${el.y + 150}`
|
||||||
|
popup.show(el.x, clientY)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2961,6 +2964,7 @@ class BesPopup extends HTMLElement {
|
|||||||
* @param {Number} y Y location hint
|
* @param {Number} y Y location hint
|
||||||
*/
|
*/
|
||||||
show(x, y) {
|
show(x, y) {
|
||||||
|
console.log(x, y)
|
||||||
this.style.position = 'fixed'
|
this.style.position = 'fixed'
|
||||||
|
|
||||||
// Element needs some initial placement for the browser to provide this.offsetWidth and this.
|
// Element needs some initial placement for the browser to provide this.offsetWidth and this.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user