Tweak orientation helper to prevent popups from going off screen

This commit is contained in:
Adrien Maston
2026-01-23 14:06:17 +01:00
parent 65b2db0ec8
commit 764eb8987a
5 changed files with 29 additions and 23 deletions
@@ -15,11 +15,11 @@ export default class extends Controller {
}
mouseEnter(event) {
orient(this.#tooltipElement)
orient({ target: this.#tooltipElement, anchor: this.element })
}
mouseOut(event) {
orient(this.#tooltipElement, false)
orient({ target: this.#tooltipElement, reset: true })
}
get #tooltipElement() {