Skip to content

fix: Dismiss touch :active once a press moves past the tap slop#9877

Merged
MatiPl01 merged 1 commit into
mainfrom
@matipl01/css-active-slop-dismiss
Jul 8, 2026
Merged

fix: Dismiss touch :active once a press moves past the tap slop#9877
MatiPl01 merged 1 commit into
mainfrom
@matipl01/css-active-slop-dismiss

Conversation

@MatiPl01

@MatiPl01 MatiPl01 commented Jul 5, 2026

Copy link
Copy Markdown
Member

Make touch :active transient like mobile web: a press that turns into a scroll or drags past the tap slop clears :active, instead of holding it until the finger lifts.

Stacked on #9793 (touch :hover web-parity).

Example recording

:active dismissed once a press moves past the tap slop

Press and hold the box, then drag the finger off it. Works the same on android.

Before After
:active stays held until the finger lifts, even as the press turns into a scroll :active is dismissed as soon as the press moves past the tap slop, matching mobile web
- -
ScreenRecording_07-07-2026.14-02-52_1.1.mp4
ScreenRecording_07-07-2026.13-54-47_1.1.mp4

@MatiPl01 MatiPl01 self-assigned this Jul 5, 2026
@MatiPl01 MatiPl01 force-pushed the @matipl01/css-active-slop-dismiss branch from a942db1 to efea196 Compare July 8, 2026 11:24
@MatiPl01 MatiPl01 force-pushed the @matipl01/css-hover-web-parity branch from fdc9959 to 1031a57 Compare July 8, 2026 13:35
@MatiPl01 MatiPl01 force-pushed the @matipl01/css-active-slop-dismiss branch from efea196 to 1d101f7 Compare July 8, 2026 13:35
@MatiPl01 MatiPl01 marked this pull request as ready for review July 8, 2026 13:45
@MatiPl01 MatiPl01 requested review from tjzel and tomekzaw July 8, 2026 13:46
Base automatically changed from @matipl01/css-hover-web-parity to main July 8, 2026 14:42
@MatiPl01 MatiPl01 force-pushed the @matipl01/css-active-slop-dismiss branch from 1d101f7 to 558e6c8 Compare July 8, 2026 15:02
Match mobile web, where :active is transient: a press that turns into a scroll or drags off the element clears it (unlike the sticky :hover). iOS splits the shared gesture handler and drops :active on movement past the slop, measured in window space so a content-tracking scroll still counts; Android adds ACTION_MOVE handling using scaledTouchSlop. The single active-pointer token is held until the finger lifts.
@MatiPl01 MatiPl01 force-pushed the @matipl01/css-active-slop-dismiss branch from 558e6c8 to 23a0139 Compare July 8, 2026 21:51
@MatiPl01 MatiPl01 added this pull request to the merge queue Jul 8, 2026
Merged via the queue into main with commit 910cb26 Jul 8, 2026
12 checks passed
@MatiPl01 MatiPl01 deleted the @matipl01/css-active-slop-dismiss branch July 8, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants