Open Bug 1814084 Opened 1 year ago Updated 9 months ago

Remove hack where WheelEvent deltaX/Y/Z depend on deltaMode getter was called

Categories

(Core :: DOM: Events, defect)

Desktop
All
defect

Tracking

()

Tracking Status
firefox-esr102 --- affected
firefox109 --- wontfix
firefox110 --- wontfix
firefox111 --- wontfix

People

(Reporter: zcorpan, Unassigned)

References

(Regression)

Details

(Keywords: regression)

See https://bugzilla.mozilla.org/show_bug.cgi?id=1392460#c34

Currently in Gecko the value of deltaX/deltaY/deltaZ depend on the order of accessing them relative to accessing deltaMode. This is bad because it's unexpected behavior and causes confusion for web developers:

I think we should instead always return pixels, and add new properties for lines and page, as suggested in https://github.com/w3c/uievents/issues/181#issuecomment-394918199

Set release status flags based on info from the regressing bug 1392460

:emilio, since you are the author of the regressor, bug 1392460, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)

Yeah, unconditionally returning pixels is what I implemented originally, but there are use cases to read the other deltas so this was the "best" compromise. If there's a solid proposal for the new attributes or you think it'd be beneficial to experiment, I'm happy to implement this behind a pref. I think it's fine to do readonly attribute double? pageDeltaX; or so, wdyt masayuki?

Flags: needinfo?(emilio) → needinfo?(masayuki)

There was some discussion to actually standardize Gecko's behavior, IIRC @garykac was thinking that.

Yeah, I'd really want some other APIs to keep getting current resolution delta values for web apps preferring it before making the change. However, the discussions which fix the gabs between browsers stopped immediately...

On the other hand, even if deltaMode is checked correctly, the "odd" behavior never becomes problem. And currently this was problem only on the web app zcorpan mentioned in the spec issue. Therefore, I don't think that we should change the behavior right now (without alternative APIs).

Flags: needinfo?(masayuki)
Severity: -- → S3
OS: Unspecified → All
Hardware: Unspecified → Desktop
You need to log in before you can comment on or make changes to this bug.