Skip to content

Conversation

@Saadnajmi
Copy link
Collaborator

Summary:

Cherry pick changes from #2117 to enable onKeyDown/onKeyUp/keyDownEvents/keyUpEvents and onDragEnter/onDragLeave/onDrop on TextInput. Note that onPaste (which also uses dataTransfer) is omitted.

Test Plan:

Updated the example test page to showcase the keyboard APIs with TextInput.

Nick Lefever and others added 5 commits October 7, 2025 01:15
Summary: This diff adds keyboard event handling to the TextInput component by testing the valid keys for manual keyboard event handling and dispatching key events to the View component keyboard handling method.

Test Plan:
- Run Workplace Chat with Fabric enabled.
- Open a message thread with 3 or more participants.
- Type `@` to display the reference selector.
- Change the selection with the up and down arrows and select an entry with tab to test the custom keyboard event handling.

 https://pxl.cl/4ghtH

Reviewers: shawndempsey, #rn-desktop

Reviewed By: shawndempsey

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

Tasks: T157889406, T154618477
Summary: Add support for drag and drop to the TextInput component. This re-uses the drag and drop handlers implemented on the View component to support dropping images/files on TextInput views directly.

Test Plan:
* Run Zeratul with Fabric enabled
* Drag and drop an image on the message composer
* Send the attachment

https://pxl.cl/4ldBX

Reviewers: shawndempsey, #rn-desktop

Reviewed By: shawndempsey

Differential Revision: https://phabricator.intern.facebook.com/D53674740
@Saadnajmi Saadnajmi requested a review from a team as a code owner October 7, 2025 08:22
@Saadnajmi Saadnajmi changed the title feat(fabric): Implement keyboard events API and drop and drop API for TextInput feat(fabric): Implement keyboard events and drag/drop APIs for TextInput Oct 7, 2025
@Saadnajmi Saadnajmi merged commit 2b2f679 into microsoft:main Oct 8, 2025
21 checks passed
@Saadnajmi Saadnajmi deleted the drag-textinput branch October 15, 2025 17:11
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