fix: use e.button === 1 for pointerup handlers instead of isMiddlePointerInput

On pointerup, e.buttons reflects post-release state. Releasing LEFT while
MIDDLE is held gives e.buttons=4, causing isMiddlePointerInput to
false-positive. e.button is authoritative on up events, so use it directly
in all three pointerup sites: LGraphCanvas.processMouseUp, useStringWidget,
useMarkdownWidget.
This commit is contained in:
Glary-Bot
2026-04-19 08:31:55 +00:00
parent 599e864d42
commit 7b4096e8d9

View File

@@ -3849,7 +3849,7 @@ export class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap>
this
)
}
} else if (isMiddlePointerInput(e)) {
} else if (e.button === 1) {
this.dirty_canvas = true
this.dragging_canvas = false
} else if (e.button === 2) {