From bad923a7f0d5cff82e0854f222b59ce6ff7d199a Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Sat, 1 Mar 2025 22:34:23 +1100 Subject: [PATCH] [Refactor] Remove deprecated mousewheel events (#652) Prefer "wheel" event (added around Chrome v31). --- src/LGraphCanvas.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/LGraphCanvas.ts b/src/LGraphCanvas.ts index d035df7cf..9672524e8 100644 --- a/src/LGraphCanvas.ts +++ b/src/LGraphCanvas.ts @@ -1730,7 +1730,7 @@ export class LGraphCanvas implements ConnectionColorContext { // down do not need to store the binded LiteGraph.pointerListenerAdd(canvas, "down", this._mousedown_callback, true) - canvas.addEventListener("mousewheel", this._mousewheel_callback, false) + canvas.addEventListener("wheel", this._mousewheel_callback, false) // CHECK: ??? binded or not LiteGraph.pointerListenerAdd(canvas, "up", this._mouseup_callback, true) @@ -1739,11 +1739,6 @@ export class LGraphCanvas implements ConnectionColorContext { canvas.addEventListener("pointercancel", this._mousecancel_callback, true) canvas.addEventListener("contextmenu", this._doNothing) - canvas.addEventListener( - "DOMMouseScroll", - this._mousewheel_callback, - false, - ) // Keyboard ****************** this._key_callback = this.processKey.bind(this)