From df49a727ff0c786adf316b17632124076e847e16 Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Sat, 13 Jan 2024 17:00:30 +0000 Subject: [PATCH 1/2] Fix modifiers triggering key down checks --- web/extensions/core/undoRedo.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web/extensions/core/undoRedo.js b/web/extensions/core/undoRedo.js index 3cb13752..ff976c74 100644 --- a/web/extensions/core/undoRedo.js +++ b/web/extensions/core/undoRedo.js @@ -106,6 +106,7 @@ const bindInput = (activeEl) => { } }; +let keyIgnored = false; window.addEventListener( "keydown", (e) => { @@ -116,6 +117,9 @@ window.addEventListener( return; } + keyIgnored = e.key === "Control" || e.key === "Shift" || e.key === "Alt" || e.key === "Meta"; + if (keyIgnored) return; + // Check if this is a ctrl+z ctrl+y if (await undoRedo(e)) return; @@ -127,6 +131,13 @@ window.addEventListener( true ); +window.addEventListener("keyup", (e) => { + if (keyIgnored) { + keyIgnored = false; + checkState(); + } +}); + // Handle clicking DOM elements (e.g. widgets) window.addEventListener("mouseup", () => { checkState(); From 9bddc9d94b478202c6ea3e8ff8007efefcc047c1 Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Sat, 13 Jan 2024 21:02:51 +0000 Subject: [PATCH 2/2] Fix crash on group render --- web/extensions/core/groupNode.js | 1 + 1 file changed, 1 insertion(+) diff --git a/web/extensions/core/groupNode.js b/web/extensions/core/groupNode.js index 4cf1f762..80b836b7 100644 --- a/web/extensions/core/groupNode.js +++ b/web/extensions/core/groupNode.js @@ -843,6 +843,7 @@ export class GroupNodeHandler { const r = onDrawForeground?.apply?.(this, arguments); if (+app.runningNodeId === this.id && this.runningInternalNodeId !== null) { const n = groupData.nodes[this.runningInternalNodeId]; + if(!n) return; const message = `Running ${n.title || n.type} (${this.runningInternalNodeId}/${groupData.nodes.length})`; ctx.save(); ctx.font = "12px sans-serif";