Open
Bug 819112
Opened 13 years ago
Updated 1 year ago
Set active pseudoclass on touchstart target
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
NEW
People
(Reporter: wesj, Unassigned)
References
Details
Native Fennec uses the :active selector on touchstart to provide a way to do "tap highlights" in mobile webapps. This is also the practice encouraged by the w3c. We should move this code into the platform so that it can be used by everyone!
The tricky part here is that Fennec (currently) removes the :active selector in a few different situations:
1.) The user starts panning
2.) A longtap/context menu is shown
3.) While, the gesture detector determines if this was/was not a single tap event (i.e. the highlight will stay around for a little while after you lift your finger).
b2g now does activates the touch target on touchstart if there's no possibility of a pan gesture (and if content doesn't preventDefault() the touchstart). That is, if the target isn't the descendent of a scrollable frame.
However, to deal with bug 805908, if a pan gesture *is* possible, the touch target isn't activated until a timeout expires.
I'm not sure whether to call this bug fixed or not.
Comment 2•12 years ago
|
||
The delay in b2g is long enough that it seriously hampers visual feedback in cases like Settings (bug 866399). I think we need a better solution, or maybe just a shorter delay.
There's a tradeoff -- bug 805908 (clickable items are highlighted when you are just trying to scroll) also affects Firefox for Android, but we've leaned toward highlighting them anyway because we think the added responsiveness is worth the occasional extra highlight.
A brief look at an Android device suggests that it has a delay like B2G, but the Android delay seems significantly shorter than the one on my Keon.
Blocks: 866399
Comment 3•12 years ago
|
||
(In reply to Matt Brubeck (:mbrubeck) from comment #2)
> A brief look at an Android device suggests that it has a delay like B2G, but
> the Android delay seems significantly shorter than the one on my Keon.
Actually, Android list views seem to set the "active" style in two different situations: (1) if the touch is still down after a delay, like in Firefox OS, and (2) after "touchend" if a tap is detected.
Case 2 happens immediately after touchend with no delay, and the active style just flashes very briefly. I think adding similar logic to Gecko / Firefox OS would help a lot with perceived tap responsiveness in scrollable views.
Updated•12 years ago
|
OS: Linux → All
Updated•9 years ago
|
See Also: → https://github.com/w3c/pointerevents/issues/123
| Assignee | ||
Updated•7 years ago
|
Component: Event Handling → User events and focus handling
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•