Bug 221366

Summary: :active pseudoclass not removed when element ineligible for click event (iOS)
Product: WebKit Reporter: Jordan Walke <jordojw>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: akeerthi, dino, koivisto, simon.fraser, smoley, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Jordan Walke
Reported 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.
Attachments
Smoley
Comment 1 2021-02-09 16:15:47 PST
Thanks for filing. Apple internal see also: rdar://49868944
Note You need to log in before you can comment on or make changes to this bug.