Adjust javascript API to handle high resolution mouse scrolling

NEW
Unassigned

Status

()

Core
Event Handling
6 years ago
6 years ago

People

(Reporter: faaborg, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Now that bug 605648 has landed, sites like http://maps.yahoo.com that monitor for mouse wheel events are no longer functional.  While they were expecting an event per notch on the mouse wheel, the number of mouse wheel events has increased considerably making the zoom extremely sensitive.

We need to either aggregate events we are sending to sites, or adjust the javascript API to account for high resollution scrolling.
No, the DOM events are not changed by bug 605648. I don't see any difference between Nightly and Fx3.6 on the yahoo map.
(Reporter)

Comment 2

6 years ago
Right, the DOM events are the same, but the problem is that the application is make assumptions to how much scroll delta the event represents.  This previously worked in a system where one event equals one wheel notch.  Have you tried yahoo maps with a logitech mouse and setpoint installed?
Oh, doesn't our mouse wheel event have delta property?
http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/events/nsIDOMMouseScrollEvent.idl

We set the delta value to detail property of UI event...
http://mxr.mozilla.org/mozilla-central/source/content/events/src/nsDOMMouseScrollEvent.cpp#59

>  Have you tried yahoo maps with a logitech mouse and setpoint installed?

Yes. I feel it's too fast.

I guess that you mean we should implement DOM3 MouseScroll Event?
oops, DOM3 spec is here:
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-type-wheel
D3E Wheel events are pretty close to what we have.
Do we report wrong values in MouseScroll.detail, or do we send more events?
Or does maps.yahoo.com not read .detail at all, but just count events
(if that is the case, this would be an evangelism bug, I think).

Does http://maps.google.com/ have the same problem as http://maps.yahoo.com ?

Comment 7

6 years ago
http://maps.google.com seems to invoke 'preventDefault' on the wheel event, but I'm not seeing the same behavior for http://maps.yahoo.com (perhaps because the site never has a vertical scroll bar). Could we use the 'defaultPrevented' state as a hint to aggregate the wheel events?
(Reporter)

Comment 8

6 years ago
>Could we use the 'defaultPrevented' state as a hint to aggregate the wheel
>events?

I believe Logitech did exactly that in an extension to help address this problem.
You need to log in before you can comment on or make changes to this bug.