Closed Bug 558915 Opened 14 years ago Closed 14 years ago

Scroll wheel zooming breaks after pan


(Firefox for Android Graveyard :: Panning/Zooming, defect)

Not set


(Not tracked)



(Reporter: mbrubeck, Assigned: mbrubeck)



(3 files, 1 obsolete file)

Steps to reproduce (requires a mouse with a scroll wheel):
1. Open any web page.
2. Drag to pan the web page.
3. Use the scroll wheel to zoom the page.

Expected: Page zooms.
Actual:   Nothing happens.
"this" in the timeout callback is set to the global object, so writes to a global variable "pendingEvent" instead of the intended instance variable.
Attachment #438588 - Flags: review?(mark.finkle)
Attachment #438588 - Attachment is patch: true
Attachment #438588 - Attachment mime type: application/octet-stream → text/plain
ungrab is never called with its first argument null, so this is dead code.  I see no no need calling it with null in the future either.  (If the InputHandler was not grabbed, then there should be no ignored events to restore.)
Attachment #438590 - Flags: review?(mark.finkle) adds support for nested grab/ungrab calls, but requires one call to ungrab() for every call to grab().

MouseModule disobeys this since it calls grab many times (on mousedown *and* on each mousemove), but calls ungrab only once (on mouseup).  This always leaves the InputHandler in a "grabbed" state and prevents calls to any other handler.

This patch prevents nested grabs in MouseModule.
Attachment #438592 - Flags: review?(mark.finkle)
6629e9516bb1 greatly complicated grab/ungrab by adding support for nested calls and event replay.  Nine months later, we are still not using either of those features, so most of this code has never been used or tested.  Maybe we should just remove it?

On the other hand, bug 558320 might actually use these features.
Attachment #438588 - Flags: review?(mark.finkle) → review+
Attachment #438590 - Flags: review?(mark.finkle) → review+
Comment on attachment 438594 [details] [diff] [review]
patch 3 (alternate): remove nested grab code

Lets try to remove this cruft
Attachment #438594 - Flags: review+
Attachment #438592 - Attachment is obsolete: true
Attachment #438592 - Flags: review?(mark.finkle)
Ungrabbing with replay events can actually be useful. I'm using it in my experimental gesture support. The "too much grabbing" issue needs to be fixed in MouseModule (that probably only should grab when panning) but the nested feature was actually needed.
verified FIXED on build:

Mozilla/5.0 (Macintosh; U; Intel Mac OSX 10.5; en-US; rv: Gecko/20100413 Namoroka/3.6.4pre Fennec/1.1a2pre
You need to log in before you can comment on or make changes to this bug.