Skip to content

fix(Tooltip): avoid wrapping child in an extra Pressable focus stop - #5287

Open
EnesKartal wants to merge 1 commit into
callstack:mainfrom
EnesKartal:fix/tooltip-focus-stop
Open

EnesKartal wants to merge 1 commit into
callstack:mainfrom
EnesKartal:fix/tooltip-focus-stop

Conversation

@EnesKartal

Copy link
Copy Markdown
Contributor

Fixes #5282.

Tooltip wrapped its children in a <Pressable> with onPress, onLongPress, onPressOut, and onHoverIn/onHoverOut, even though the same props were also cloned onto children. On Android, Web, and iOS this created an extra focusable/accessible wrapper stop (and stretched tap area) separate from the child control.

Changes

  • Replace the outer <Pressable> wrapper in Tooltip with a non-pressable <View collapsable={false}> used only for layout measurement (childrenWrapperRef.current?.measure(...)) and cursor styling.
  • Add a unit test verifying the wrapper does not intercept presses or act as a pressable stop.

Copilot AI balanced review requested due to automatic review settings November 23, 2026 16:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-actions

Copy link
Copy Markdown

Found potential problems with the pull request:

  • Screenshot or video evidence is missing. Make sure to include one if it affects the UI.

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

Copy link
Copy Markdown
Collaborator

Thanks! This fixes all three parts of #5282 and goes into 6.0. Before review:

  • Typecheck fails on the new test (Tooltip.test.tsx:518): DummyComponent doesn't accept onPress.
  • Could you add before and after screenshots or a short video?
  • The long-press handlers now sit only on the cloned child. Does a Tooltip around a child without press props (a plain Icon or Text) still show on long press on Android and iOS? A test for that would help.

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.

Tooltip: the wrapper is a focus stop of its own and hides its child's role

3 participants