Skip to content

[DRAFT] fix(fabric, Text): render with NSTextView + support text selection - #2673

Closed
Saad Najmi (Saadnajmi) wants to merge 3 commits into
microsoft:mainfrom
Saadnajmi:fabric/selection
Closed

[DRAFT] fix(fabric, Text): render with NSTextView + support text selection#2673
Saad Najmi (Saadnajmi) wants to merge 3 commits into
microsoft:mainfrom
Saadnajmi:fabric/selection

Conversation

@Saadnajmi

Copy link
Copy Markdown
Collaborator

Summary:

Cherry pick a commit from #2117 to support Text selection, along with some changes to RCTSurfaceTouchHandler from #2394

Test Plan:

Todo

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Don't want else here

Saad Najmi (Saadnajmi) added a commit that referenced this pull request Sep 10, 2025
## Summary:
Revert #2286 There are 3 commits that make Text Selection work via NSTextView on
Fabric, but we only ever merged two of them in. The 3rd (currently in
#2673 ) is a work-in-progress, as it currently doesn't work.
I need to debug why text selection doesn't work, but as it stands, the
diffs to render with an NSTextView add more complexity for not much gain
without it. I'd rather reland all the commits together and test with an
implementation of Text closer to iOS in the meanwhile.
## Test Plan:
CI should pass
Summary: Override the hitTest and mouseDown handler in `RCTParagraphComponentView` to forward mouse drag events to the underlying NSTextView to get text selection support in Fabric with correct rendering.
Test Plan:
- Run Zeratul with Fabric enabled.
- Select text
https://pxl.cl/3q3b3
Reviewers: shawndempsey, chpurrer, #rn-desktop
Reviewed By: shawndempsey
Differential Revision: https://phabricator.intern.facebook.com/D49465174
Tasks: T163838519
@SaadnajmiSaad Najmi (Saadnajmi) changed the title fix(fabric, Text): support text selectionfix(fabric, Text): render with NSTextView + support text selectionSep 10, 2025
@SaadnajmiSaad Najmi (Saadnajmi) changed the title fix(fabric, Text): render with NSTextView + support text selection[DRAFT] fix(fabric, Text): render with NSTextView + support text selectionSep 11, 2025
@Saadnajmi

Copy link
Copy Markdown
CollaboratorAuthor

Succeeded by #2864

Sign up for freeto 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.

1 participant

@Saadnajmi