mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-08 20:34:35 +08:00
Fix context too eager preventdefault for Points/Spline editors
This was blocking context menu for some other elements.
This commit is contained in:
parent
be96f5c3a3
commit
c661baadd9
@ -661,7 +661,10 @@ class PointsEditor {
|
||||
createContextMenu = () => {
|
||||
self = this;
|
||||
document.addEventListener('contextmenu', function (e) {
|
||||
if (e.target.closest(`#points-editor-${self.node.uuid}`) ||
|
||||
e.target.closest('#context-menu')) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('click', function (e) {
|
||||
|
||||
@ -1024,7 +1024,10 @@ this.lastMousePosition = { x: this.width/2, y: this.height/2 };
|
||||
this.node.contextMenu = newMenu;
|
||||
|
||||
document.addEventListener('contextmenu', function (e) {
|
||||
if (e.target.closest(`#points-editor-${self.node.uuid}`) ||
|
||||
e.target.closest('#context-menu')) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('click', function (e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user