Christopher Speck created GUACAMOLE-1967:
--------------------------------------------
Summary: Multiple wheel events per mouse wheel tick
Key: GUACAMOLE-1967
URL: https://issues.apache.org/jira/browse/GUACAMOLE-1967
Project: Guacamole
Issue Type: Bug
Components: guacamole-common-js
Affects Versions: 1.5.5
Reporter: Christopher Speck
When using a mouse's wheel for scrolling (not trackpad), multiple wheel events
end up being sent per single wheel tick.
Looking at guacamole-common-js/Mouse.js it looks like the wheel handler is
being attached in different ways to support old browsers, however modern
browsers support the old event names ("mousewheel" and "DOMMouseScroll") for
backwards compatibility in addition to the new ("wheel"). I think the result is
that Firefox (and likely Chrome) end up triggering the wheel handler multiple
times per actual use.
In basic testing a change like this seems appropriate:
{{if (WheelEvent) {}}
{{ // all modern browsers}}
{{ addEventListener('wheel', ...}}
{{} else {}}
{{ // firefox}}
{{ addEventListener('DOMMouseScroll', ...}}
{{ // chrome}}
{{ addEventListener('mousewheel', ...}}
{{}}}
Link to current code being referenced:
[https://github.com/apache/guacamole-client/blob/1ca1161a68030565a37319ec6275556dfcd1a1af/guacamole-common-js/src/main/webapp/modules/Mouse.js#L261]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)