Skip to content

Add TouchableSpan interface for position-aware touch on text spans (#56709)#56709

Closed
andrewdacenko wants to merge 1 commit intofacebook:mainfrom
andrewdacenko:export-D97417356
Closed

Add TouchableSpan interface for position-aware touch on text spans (#56709)#56709
andrewdacenko wants to merge 1 commit intofacebook:mainfrom
andrewdacenko:export-D97417356

Conversation

@andrewdacenko
Copy link
Copy Markdown
Contributor

@andrewdacenko andrewdacenko commented May 6, 2026

Summary:

Changelog: [Internal]

Introduces TouchableSpan, an interface for spans that receive full
MotionEvent touch events from PreparedLayoutTextView. Unlike
ClickableSpan which only provides an onClick callback with no
position information, TouchableSpan receives the full MotionEvent,
enabling position-aware interactions such as dismiss animations
originating from the tap point.

Reviewed By: Abbondanzo

Differential Revision: D97417356

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 6, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels May 6, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 6, 2026

@andrewdacenko has exported this pull request. If you are a Meta employee, you can view the originating Diff in D97417356.

@meta-codesync meta-codesync Bot changed the title Add TouchableSpan interface for position-aware touch on text spans Add TouchableSpan interface for position-aware touch on text spans (#56709) May 7, 2026
andrewdacenko added a commit to andrewdacenko/react-native that referenced this pull request May 7, 2026
…acebook#56709)

Summary:

Changelog: [Internal]

Introduces `TouchableSpan`, an interface for spans that receive full
`MotionEvent` touch events from `PreparedLayoutTextView`. Unlike
`ClickableSpan` which only provides an `onClick` callback with no
position information, `TouchableSpan` receives the full `MotionEvent`,
enabling position-aware interactions such as dismiss animations
originating from the tap point.

Reviewed By: Abbondanzo

Differential Revision: D97417356
andrewdacenko added a commit to andrewdacenko/react-native that referenced this pull request May 7, 2026
…acebook#56709)

Summary:

Changelog: [Internal]

Introduces `TouchableSpan`, an interface for spans that receive full
`MotionEvent` touch events from `PreparedLayoutTextView`. Unlike
`ClickableSpan` which only provides an `onClick` callback with no
position information, `TouchableSpan` receives the full `MotionEvent`,
enabling position-aware interactions such as dismiss animations
originating from the tap point.

Reviewed By: Abbondanzo

Differential Revision: D97417356
…acebook#56709)

Summary:

Changelog: [Internal]

Introduces `TouchableSpan`, an interface for spans that receive full
`MotionEvent` touch events from `PreparedLayoutTextView`. Unlike
`ClickableSpan` which only provides an `onClick` callback with no
position information, `TouchableSpan` receives the full `MotionEvent`,
enabling position-aware interactions such as dismiss animations
originating from the tap point.

Reviewed By: Abbondanzo

Differential Revision: D97417356
@meta-codesync meta-codesync Bot closed this in 2a0f595 May 7, 2026
@facebook-github-tools facebook-github-tools Bot added the Merged This PR has been merged. label May 7, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 7, 2026

This pull request has been merged in 2a0f595.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @andrewdacenko in 2a0f595

When will my fix make it into a release? | How to file a pick request?

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants