This commit is contained in:
Terry Jia
2025-09-04 23:08:28 -04:00
parent 780f1936ed
commit 233c306431
2 changed files with 5 additions and 11 deletions

View File

@@ -554,7 +554,6 @@ test.describe('Canvas Interaction', () => {
// Release space
await comfyPage.page.keyboard.up('Space')
await comfyPage.nextFrame()
expect(await getCursorStyle()).toBe('default')
// Move mouse - cursor should remain default

View File

@@ -3674,16 +3674,11 @@ export class LGraphCanvas
}
} else if (e.type == 'keyup') {
if (e.key === ' ') {
// space - only revert if we had temporarily switched to pan mode
if (
LiteGraph.canvasNavigationMode === 'standard' &&
this._previously_dragging_canvas !== null
) {
this.read_only = false
this.dragging_canvas =
(this._previously_dragging_canvas ?? false) && this.pointer.isDown
this._previously_dragging_canvas = null
}
// space
this.read_only = false
this.dragging_canvas =
(this._previously_dragging_canvas ?? false) && this.pointer.isDown
this._previously_dragging_canvas = null
}
for (const node of Object.values(this.selected_nodes)) {