deltaMode default should be DOM_DELTA_PIXEL
Categories
(Core :: DOM: Events, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: karlcow, Assigned: emilio)
References
(Blocks 1 open bug, Regressed 1 open bug)
Details
(Whiteboard: [dom] [ui events])
Attachments
(1 file)
Reporter | ||
Updated•7 years ago
|
Reporter | ||
Updated•7 years ago
|
Comment 2•7 years ago
|
||
Comment 4•7 years ago
|
||
Updated•7 years ago
|
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
Comment 8•7 years ago
|
||
Comment 9•7 years ago
|
||
Comment 10•7 years ago
|
||
Comment 11•7 years ago
|
||
Comment 12•7 years ago
|
||
Comment 13•7 years ago
|
||
Comment 14•7 years ago
|
||
Comment 15•7 years ago
|
||
Reporter | ||
Updated•7 years ago
|
Updated•6 years ago
|
Comment 17•6 years ago
|
||
See bug 1547409. Moving webcompat whiteboard tags to project flags.
Updated•5 years ago
|
Comment 18•5 years ago
|
||
(removing URL, because Google has fixed privacy.google.com (and it now redirects to https://safety.google/privacy/ -- no more mouse scroll issues)
Updated•5 years ago
|
Comment 21•5 years ago
|
||
There's decent evidence this is affecting a significant amount of websites. Marking this qf:p1 for now.
Reporter | ||
Updated•5 years ago
|
Comment 22•5 years ago
|
||
I wonder, a lot of web developers do not know WheelEvent.deltaMode
. From point of the other side view, there might be multiplying our delta values if and only if running on Firefox. If so, changing default deltaMode
value would break some web apps which do not have any trouble on Firefox...
Blacklist might be useful like keypress
events?
Comment 23•5 years ago
|
||
(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900) from comment #22)
Blacklist might be useful like
keypress
events?
I think so, yeah. There's bound to be weird breakage we won't know about (until someone complains).
Comment 24•5 years ago
|
||
Is it possible to collect telemetry on pages that read WheelEvent.deltaY without either having read WheelEvent.deltaMode already or reading deltaMode within the next clock second or so?
Reporter | ||
Comment 25•5 years ago
|
||
example:
etc.
found with https://github.com/search?p=5&q=WheelEvent+firefox+deltay&type=Code
I didn't check if they had an impact.
Comment 26•5 years ago
|
||
Obviously, the last one will be broken (and also already broken on some environments).
Reporter | ||
Updated•4 years ago
|
Updated•4 years ago
|
Reporter | ||
Comment 27•4 years ago
|
||
Masayuki,
- Is it possible to have a telemetry probe to detect how many times Websites are using wheelEvent.delta(X|Y|Z) without reading wheelEvent.deltaMode (Probably quite hard or at least difficult to clearly assess).
- Do you think we could release Firefox Nightly with the
wheelEvent.deltaMode = 0
by default with a preference we could set on/off. Not necessary for a long time, but to study if we detect massive webcompat issues here and there after this move?
The item 2 would give us a better picture of the reality?
Comment 28•4 years ago
|
||
(In reply to Karl Dubost💡 :karlcow from comment #27)
Masayuki,
- Is it possible to have a telemetry probe to detect how many times Websites are using wheelEvent.delta(X|Y|Z) without reading wheelEvent.deltaMode (Probably quite hard or at least difficult to clearly assess).
If we ignore origin of the referrer of the attributes (i.e., the case referred by 3rd party's iframe
document, etc), we can do it. In that case, we can know number and/or percentage of web sites which completely ignore deltaMode
.
- Do you think we could release Firefox Nightly with the
wheelEvent.deltaMode = 0
by default with a preference we could set on/off. Not necessary for a long time, but to study if we detect massive webcompat issues here and there after this move?
Technically, of course, it's possible. But I worry about:
- some Nightly users stop using latest builds
- they don't report that
And I don't have much time until I ship beforeinput
event.
Finally, I'm not sure the policy about this kind of risky examination.
The item 2 would give us a better picture of the reality?
I hope so if it's allowed.
Assignee | ||
Comment 30•4 years ago
|
||
And use them to disable DOM_DELTA_LINES on Nightly builds, to see the
impact, since this is pretty hard to measure just with telemetry.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 31•4 years ago
|
||
Comment 32•4 years ago
|
||
bugherder |
Comment 33•3 years ago
|
||
I'm trying to understand the fix that was implemented for this bug (or if a later fix has changed this).
From my testing it looks like delta values will be in DOM_DELTA_PIXEL unless the value of deltaMode is checked in which case it switches to DOM_DELTA_LINES.
This seems rather inconvenient in my situation. I would like the pixel values but if I check that I'm getting pixel values then I will end up with line values, which I will then have to somehow convert back to pixels...
Assignee | ||
Comment 34•3 years ago
|
||
It returns pixels unless deltaMode is checked before getting the delta. If you prefer pixels, you can get the delta before checking deltaMode (and deltaMode would return pixels with the fix for this bug).
Comment 35•3 years ago
|
||
Hello everyone and happy new year,
This is my first time commenting in bugzilla, so apologies if this is not the right place it, feel free to remove it if deemed inappropriate.
First of all I would like to thank the people working on this to improve web compatibility and the web standards.
But this undocumented behavior has cost me (and probably others) a day of frustration and I'll explain why:
-
- I was trying to implement scroll based interactions in a web app that don't concern actual scrolling content (like zooming on a map and changing a value of a field, eg. the numeric input field)
- I was checking the
deltaMode
but not before accessingdeltaY
(because I didn't know of this change)
-
First thing I noticed was that
deltaMode
was alwaysDOM_DELTA_PIXEL
even-though I remembered gettingDOM_DELTA_LINE
before. -
delta*
varied with thefont-size
of theevent.target
for imprecise devices (like a mouse) in Firefox but not in the others. -
So I tried to undo that variation to get a constant
delta*
like what I get in other browsers. (This took a lot of trail and error) -
Then I found out that for precise devices (like a trackpad) everything works the as expected in Safari, Chrome and Firefox 🌈, but the problem is that there's no way to distinguish between precise and imprecise which rendered my work in 3. useless.
-
Finally I came to bugzilla to report my findings, and the "Find similar issues" thing pointed me this thread and I finally understood.
So to save others from going though this again I opened an issue mdn/content#11811 to update the documentation on MDN.
I just hope that the next time a breaking change is released, the documentation (eg. MDN) is updated.
I mean no offense to anyone, I just wish the web platform wasn't filled with booby-traps like this one.
Thanks again for your work on improving web compatibility and specs.
PS: I've omitted the steps where I searched the web for information about the subject but came out empty before finding this thread.
Comment 36•3 years ago
|
||
(In reply to ziad.khoury.h from comment #35)
I just hope that the next time a breaking change is released, the documentation (eg. MDN) is updated.
I mean no offense to anyone, I just wish the web platform wasn't filled with booby-traps like this one.
Sorry for wasting your time with the hacky fix. I apologize that we forgot to add dev-doc-needed
keyword here to update MDN. We just announced this change in the "Intent to ship" post.
Updated•3 years ago
|
Description
•