Scrolling inside a .div using the touchpad causes the whole page to scroll on google graphs
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
People
(Reporter: obotisan, Unassigned)
References
Details
(Keywords: webcompat:site-wait)
Attachments
(1 file)
4.29 MB,
video/quicktime
|
Details |
[Notes]: - You need a MacBook. [Affected versions]: - Latest Nightly 65.0a1 - Beta 64.0b9 - Firefox 63.0.1 [Affected platforms]: - macOS 10.14 - macOS 10.13 - Windows 10 x64 [Steps to reproduce]: 1. Go to https://www.google.com/search?q=sqrt(x*x%2By*y)%2B3*cos(sqrt(x*x%2By*y))%2B5&cad=h 2. Click inside the .div. 3. Scroll using the touchpad. [Expected result]: - The graph is zoom in and out. - The page doesn't scroll down and up. [Actual result]: - The graph is zoom in and out. - The page scrolls down and up. [Regression range]: - I am not sure if it's a regression, but if it is, I will leave the pushlog in a comment. - Please look at the attached gif. [Additional notes]: - The issue is not reproducing on Chrome.
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
I can still reproduce the issue using older versions of Nightly from 2014-01-02 and on older versions the browser doesn't open the graphic, so I can't test the issue. If this is a regression it's an old one.
Comment 2•5 years ago
|
||
Thanks for the clear bug report. To move this forward, someone (not saying it has to be you, Oana!) needs to dig into whether the events Firefox is sending on scrolling differ from other browsers or if the site is interpreting what Firefox sends incorrectly.
Comment 3•5 years ago
|
||
Marking fix-optional for 65 and 66 so that these already triaged issues don't show up repeatedly in weekly regression triage. Happy to take a patch in nightly.
Assignee | ||
Updated•5 years ago
|
Comment 4•5 years ago
|
||
See bug 1547409. Moving webcompat whiteboard tags to project flags.
Comment 5•5 years ago
|
||
Ksenia, can you take a look at this please?
Comment 6•5 years ago
|
||
In this file:
The following event listener is added to a div with the graph:
this.$ = s_s(this.Ya, s_k.eh ? "DOMMouseScroll" : "mousewheel", this, b)
,
where s_k.eh
is a check for a User Agent, so DOMMouseScroll
is added in Firefox and mousewheel
in Chrome.
When the event is firing there is a call to preventDefault in this file:
s_Gd.prototype.preventDefault = function () {
s_Gd.Ua.preventDefault.call(this);
var a = this.zd;
if (a.preventDefault) a.preventDefault();
else if (a.returnValue = !1, s_wda) try {
if (a.ctrlKey || 112 <= a.keyCode && 123 >= a.keyCode) a.keyCode = - 1
} catch (b) {
}
While preventDefault works for mousewheel
, it doesn't work for DOMMouseScroll
(need to call preventDefault() of wheel events). So the page scrolls up and down because of that.
I think both of those legacy events listeners can be replaced by wheel
, though it will require some changes in the event handler code.
Comment 7•5 years ago
|
||
Here is a related bug https://bugzilla.mozilla.org/show_bug.cgi?id=1529953 about mousewheel
support
Comment 9•5 years ago
|
||
I sent an email to our partner list.
Updated•5 years ago
|
Reporter | ||
Updated•4 years ago
|
Comment 10•4 years ago
|
||
No response so far, reaching out to our Google search mailing list.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 12•3 years ago
|
||
Updating flags based on duplicate Bug 1699400
Updated•3 years ago
|
Updated•2 years ago
|
Comment 13•2 years ago
|
||
Managed to reproduce the issue also on Ubuntu 20 X64. with build 96.0b2-snap.
In comparison with the Windows repro steps, on ubuntu the touchpad scroll must be longer in order for the page to scroll.
Updated•2 years ago
|
Comment 14•2 years ago
|
||
Also reproducible on Beta v105.0b8 on Windows 7.
Updated•2 years ago
|
Description
•