WheelEvent of DOM Level 3 Events now landed

Skip to first unread message

Masayuki Nakano

Aug 12, 2012, 12:46:09 AM8/12/12
to dev-platform, dev-planning
Hi, let me tell you about the new D3E WheelEvent landing.

All developers should use "wheel" event instead of "DOMMouseScroll" and
"MozMousePixelScroll" if it's possible. If you need pixel delta values
and line or page delta values in any deltaMode, please file a bug, it
might be nice for internal code.

New "wheel" event replaces legacy mouse scroll events such as
"DOMMouseScroll" and "MozMousePixelScroll" internally. I mean that
widget/* will never dispatch the legacy events anymore and
nsEventStateManager will never handle them too. But for web
application's compatibility, the legacy events are fired almost same
timing. The event order is:

1. content "wheel" event
2. content/chrome "DOMMouseScroll" (if deltaX/deltaY of "wheel" event is
over 1 line)
3. content/chrome "MozMousePixelScroll"
4. chrome "wheel" event

If somebody calls preventDefault() in #1, #2 and #3 are skipped.
If somebody calls preventDefault() in #1, #2 or #3, chrome wheel event's
defaultPrevented attribute becomes true.
# I'll document the detail in MDN later.

There is additional important change you should know.

By the changes, some prefs of mousewheel.* don't make sense now. They
are replaced with new prefs:


Just removed.


Replaced with
New prefs' value multiplies deltaX, deltaY or deltaZ of "wheel"
event. 100 means 1.0 but values less than 100 and larger than -100 are
not allowed.


Replaced with
New pref's value are:
0: Nothing happens
1: Scrolling contents
2: Go back or go forward, in your history
3: Zoom in or out.
You cannot specify different actions to X and Y since a wheel event
can have non-zero values to both deltaX and deltaY attributes same time.

Any new pref names are not same as old pref names. I.e., users need to
customize them again but users can share the customized settings between
ESR10 and Mozilla 17 or later.

I guess that somebody will report the old prefs don't work anymore.
Then, please mark such bugs as INVALID. I'll document this in MDN later.


Masayuki Nakano <masa...@d-toybox.com>
Manager, Internationalization, Mozilla Japan.
Reply all
Reply to author
0 new messages