Skip to content

fix(icon-button): size the hit slop from the laid-out size - #5318

Open
Priyanshu0007 wants to merge 1 commit into
callstack:mainfrom
Priyanshu0007:fix/icon-button-hit-slop-layout
Open

Priyanshu0007 wants to merge 1 commit into
callstack:mainfrom
Priyanshu0007:fix/icon-button-hit-slop-layout

Conversation

@Priyanshu0007

Copy link
Copy Markdown

Motivation

IconButton's hit slop came from its size token (40dp), not its laid-out size, so a button shrunk via style (30×30) got a 38dp target, not 48dp. It now uses the onLayout size, falling back to the tokens until laid out.

Closes #5310

Videos

Tapping 7dp outside a 30dp button. Before: ignored. After: onPress fires.

Android before

iconbutton-hitslop-ios-before.mp4

Android after

iconbutton-hitslop-web-before.mp4

iOS before

iconbutton-hitslop-web-after.mp4

iOS after

iconbutton-hitslop-android-before.mp4

Web before

iconbutton-hitslop-android-after.mp4

Web after

iconbutton-hitslop-ios-after.mp4

@Doberjohn Doberjohn added this to the 6.1.0 milestone Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IconButton: sized through style, it keeps its named size's hit slop, so the target stays under 48dp

2 participants