chore(0.78): backport some changes#2561
Merged
Saadnajmi merged 2 commits intomicrosoft:0.78-stablefrom Jul 23, 2025
Merged
Conversation
## Summary: This is fixed upstream with facebook#52472 . Let's commit (and backport) a smaller fix for now. ## Test Plan: Minimal repro of bug is this code below. Basically, you can't focus on "Pressable Child 2" twice by clicking on the container ``` <Pressable style={{backgroundColor: 'lightblue', padding: 10, gap: 10}} onPress={() => {myRef.current.focus();}}> <Text>Pressable Container</Text> <Pressable><Text>Pressable Child 1</Text></Pressable> <Pressable ref={myRef}><Text>Pressable Child 2</Text></Pressable> <Pressable><Text>Pressable Child 3</Text></Pressable> </Pressable> ```
## Summary: Function keys on macOS currently get dispatched with the value from the underlying NS*FunctionKey code point. For instance, a `F12` event gets dispatched as `\uf70f` for [NS12FunctionKey](https://developer.apple.com/documentation/appkit/nsf12functionkey?language=objc). To clean this up, we should dispatch the same strings we use on other platforms (i.e. `'F12'` for the F12 key). ## Test Plan: I used a pressable component with a `onKeyDown` handler in `RNTester-macOS` to test keyboard events. With this change, the function keys come in as `F12`, `F11` etc... instead of the underlying NS*FunctionKey code points. --------- Co-authored-by: Colin Heffernan <coheffer@microsoft.com>
tido64
approved these changes
Jul 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Backport: