Bug 221366 - :active pseudoclass not removed when element ineligible for click event (iOS)
Summary: :active pseudoclass not removed when element ineligible for click event (iOS)
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-02-03 17:09 PST by Jordan Walke
Modified: 2021-02-14 21:03 PST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan Walke 2021-02-03 17:09:25 PST
The :active pseudoclass is correctly applied to elements that have an ontouchstart event handler, when the user begins touching an anchor element (probably buttons too). However, when the tap become ineligible while the touches are still active, the :active pseudoclass is not removed. This can occur when the user moves their touch beyond some threshold, *or* if the element is contained inside of a scroll view (or page) that scrolls. In those cases, the :active pseudoclass should be removed. Having a reliable :active class is important for providing visual feedback to the user that when they release their touch, a "click" (or href redirect on anchor) will be triggered.

https://twitter.com/jordwalke/status/1355644884502278144

The :hover pseudoclass also remains "stuck" even after the user removes their touches, but this behavior may not be as critical to fix because there are other ways of removing the :hover class at the application level or css. The :active class is more important to fix because there is no reliable way to fix this in application space / css.
Comment 1 Smoley 2021-02-09 16:15:47 PST
Thanks for filing. Apple internal see also:
rdar://49868944