mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 11:52:38 +02:00
fix: insert contextmenu in the offsetParent
Otherwise when parent is a dialog, if the the contextemenu is in the body, it will be below the dialog forever
This commit is contained in:
parent
89c13a3b7e
commit
70f06e7852
1 changed files with 2 additions and 1 deletions
|
@ -38,7 +38,8 @@ export default class ContextMenu extends Positioned {
|
||||||
this.container.appendChild(li)
|
this.container.appendChild(li)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.body.appendChild(this.container)
|
const parent = document.elementFromPoint(event.clientX, event.clientY).offsetParent
|
||||||
|
parent.appendChild(this.container)
|
||||||
if (this.options.fixed) {
|
if (this.options.fixed) {
|
||||||
this.setPosition({ left, top })
|
this.setPosition({ left, top })
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue