On Wed, Jul 10, 2024 at 2:29 PM Christopher Speck <die.drac...@gmail.com> wrote:
> Hi, > > I've noticed that mouse wheel scroll events tend to result in excessive > scrolling. Has anyone else noticed similar behavior? > > Testing out quickly in my configuration, I'm not seeing this - but I'm using a touch pad, not an actual wheel, so not sure if that makes any difference. > 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. > > Should I create a JIRA issue for this? In basic testing a change like this > seems appropriate: > > if (WheelEvent) { > // all modern browsers > addEventListener('wheel', ... > } else { > // firefox > addEventListener('DOMMouseScroll', ... > // chrome > addEventListener('mousewheel', ... > } > > > https://developer.mozilla.org/en-US/docs/Web/API/Element/DOMMouseScroll_event > https://developer.mozilla.org/en-US/docs/Web/API/Element/mousewheel_event > > Yes, seems like a Jira issue for this would be appropriate, and then a pull request. If the above code fixes it for you, then it probably is a bug that I'm just not seeing for one reason or another, so you can submit the PR against the "patch" branch and put it in as a bug fix. Thanks! -Nick