Skip to content

Conversation

@Saadnajmi
Copy link
Collaborator

Summary:

Cherry pick more commits from #2117 , this time to add a scrollview to multiline textinout

Test Plan:

Existing test page works, although, TextInput needs more love.

Nick Lefever and others added 4 commits October 10, 2025 11:23
Summary:
The multiline text input view on macOS needs its own view hierarchy, wrapping the RCTUITextView in a scroll view to support all the features offered by the React TextInput component.

This diff adds a wrapper class for RCTUITextView that provides the appropriate view hierarchy while still supporting the text input protocols required for text input.

The wrapper forwards all unimplemented methods to the RCTUITextView so that it can be used as a direct substitute for the RCTUITextView. This allows us to reduce the custom changes need for macOS in RCTTextInputComponentView while re-using all the logic in RCTUITextView.

Test Plan: Tested later in this stack.

Reviewers: shawndempsey, #rn-desktop

Reviewed By: shawndempsey

Differential Revision: https://phabricator.intern.facebook.com/D51962394

Tasks: T167538822, T157889591

Tags: uikit-diff
Summary:
Add a `responder` property to support assigning the first responder to the actual textfield/textview if the view is wrapped or not.

The wrapped text view already implements this property. This diff brings the same functionality to the text field and declares it on the common protocol.

Test Plan: Tested later in this stack.

Reviewers: shawndempsey, chpurrer, #rn-desktop

Reviewed By: shawndempsey, chpurrer

Differential Revision: https://phabricator.intern.facebook.com/D51962395

Tasks: T167538822, T157889591
Summary:
This diff updates the core TextInput RN component to use the wrapped text view for multiline TextInput.

Switching to `RCTWrappedTextView` enables correct `borderWidth` and `contentInsets` support for multi line text inputs while maintaining the same functionality for single line text input.

Scrolling text views are also supported correctly, with vertical height dependent scrollers.

Test Plan:
- Build Zeratul with Fabric enabled.
- Type in the search field to test the layout of the text contents
- Type in the composer to test multi line support and the layout of the text contents

| Before | After |
|--|
|  https://pxl.cl/3Xrrx  |  https://pxl.cl/3Xrr9  |

Reviewers: shawndempsey, #rn-desktop

Reviewed By: shawndempsey

Differential Revision: https://phabricator.intern.facebook.com/D51962396

Tasks: T167538822, T157889591
@Saadnajmi Saadnajmi merged commit fdfba41 into main Oct 13, 2025
21 checks passed
@Saadnajmi Saadnajmi deleted the more branch October 13, 2025 13:38
@Saadnajmi Saadnajmi restored the more branch October 13, 2025 16:52
@Saadnajmi Saadnajmi deleted the more branch October 13, 2025 16:55
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.

2 participants