Skip to content

fix(fab): forward long press props so Tooltip works on FAB - #5172

Merged
lukewalczak merged 6 commits into
mainfrom
fix/fab-tooltip-press-props
Nov 18, 2026
Merged

lukewalczak merged 6 commits into
mainfrom
fix/fab-tooltip-press-props

Conversation

@lukewalczak

@lukewalczak lukewalczak commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Motivation

Tooltip wrapping a FAB never shows on mobile. Tooltip clones its child with onLongPress, onPressOut and delayLongPress, but since the MD3 FAB rewrite (2f5e55d) FAB and FAB.Extended no longer forward them to Shell, so the long press never reaches Tooltip.

Related issue

No issue. Reproducible in the example app's Tooltip screen.

Screenshots / Videos

Android, long-pressing the FAB in TooltipExample:

Before After
no tooltip image

Test plan

  1. Open the Tooltip example on Android or iOS.
  2. Long-press the FAB in the bottom-right corner and check that the tooltip appears and hides after release.

@lukewalczak
lukewalczak force-pushed the fix/fab-tooltip-press-props branch from cab49a1 to e47e166 Compare November 6, 2026 10:36
@Doberjohn Doberjohn added this to the 6.0.0 milestone Nov 9, 2026
Comment thread src/components/FAB/Shell.tsx Resolved
Comment thread src/components/__tests__/FAB.test.tsx Resolved
@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 6cb75ba

Since the review of 8cad697: 0 new · 0 still open · 0 no longer raised

No open findings.

1 finding below minor hidden (user_settings.min_severity).

1 new finding away from what changed since 8cad697 not shown. Comment @apex-sentinel-staging review for a full review.

Reviewed with this repository's own Sentinel configuration (1e20a682a24c).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@lukewalczak
lukewalczak merged commit a525c28 into main Nov 18, 2026
14 checks passed
@Doberjohn
Doberjohn deleted the fix/fab-tooltip-press-props branch November 18, 2026 08:47
likevy added a commit to likevy/react-native-paper that referenced this pull request Nov 18, 2026
The shell clears its own press state in onPressOut and also calls the onPressOut that callstack#5172 forwards. Cover a hovered FAB's release doing both.
likevy added a commit to likevy/react-native-paper that referenced this pull request Nov 18, 2026
Since callstack#5172 a FAB with only onLongPress or onPressOut is a button too.
Doberjohn added a commit that referenced this pull request Nov 18, 2026
…5237)

FAB and FAB.Extended take onLongPress and delayLongPress again since
#5172, so the migration guide no longer lists them as removed.
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.

3 participants