Skip to content

Commit

Permalink
all supported browsers have the 'wheel' event
Browse files Browse the repository at this point in the history
remove legacy workarounds
  • Loading branch information
totaam committed Feb 6, 2024
1 parent a1c1d39 commit 047f32f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 3 additions & 4 deletions html5/js/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,9 @@ class XpraClient {
}
if (Utilities.isEventSupported("wheel")) {
div.addEventListener("wheel", on_mousescroll, false);
} else if (Utilities.isEventSupported("mousewheel")) {
div.addEventListener("mousewheel", on_mousescroll, false);
} else if (Utilities.isEventSupported("DOMMouseScroll")) {
div.addEventListener("DOMMouseScroll", on_mousescroll, false); // for Firefox
}
else {
this.warn("browser does not support scroll wheel events");
}
}

Expand Down
4 changes: 0 additions & 4 deletions html5/js/Window.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,6 @@ class XpraWindow {
}
if (Utilities.isEventSupported("wheel")) {
canvas.addEventListener("wheel", on_mousescroll, false);
} else if (Utilities.isEventSupported("mousewheel")) {
canvas.addEventListener("mousewheel", on_mousescroll, false);
} else if (Utilities.isEventSupported("DOMMouseScroll")) {
canvas.addEventListener("DOMMouseScroll", on_mousescroll, false); // for Firefox
}
}

Expand Down

0 comments on commit 047f32f

Please sign in to comment.