Fix context too eager preventdefault for Points/Spline editors

This was blocking context menu for some other elements.
This commit is contained in:
kijai 2025-11-05 18:19:07 +02:00
parent be96f5c3a3
commit c661baadd9
2 changed files with 6 additions and 0 deletions

View File

@ -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) {

View File

@ -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) {