Mobile/TouchScreen/MouseEvents
From MozillaWiki
< Mobile
Problem
Touchscreen devices have no concept of "hover" or "mouseover" and "mouseout". This can be a problem for websites with menu systems that depend on "hover" capabilities.
Fennec needs a plan for dealing with these types of sites. Mobile Safari (iPhone) has a special implementation of mouse events that allows for some "hover" capabilities. mobile Safari also introduces new types of touch-related and gesture-related events.
Bugs and Patches
Currently, we have several bugs and patches that affect mouse event behavior:
- bug 492831 attachment 382735 (hover to some elements)
- bug 492831 attachment 382964 (hover to all elements)
- bug 460966 attachments 383082 + 383083 (gecko c++ and fennec JS)
- bug 460966 attachment 383164 (hover fires after a timeout)
- there may be more...
Current Touch Behaviors
- For chrome, a quick touch will send mousedown/mouseup events to the tapped item.
- For chrome, a touch on a pannable item will result in going into pan mode until the finger is lifted. If the move was short enough, this will turn into mousedown/mouseup.
- For content, any touch starts a pan of the browser. If you move sufficiently far, the pan will continue and no extra events will be sent when you lift your finger.
- For content, a touch without moving far will result in a single click. This will be sent after a short delay.
- If another tap arrives before the click delay is expired, we abort sending a click. This new click will call a double click handler that performs zooming operations on the canvas.
Desired Behaviors
- Application of CSS hover style to elements that are tapped
- Sending of additional mouseover/mouseout events based on tap location