Skip to content

Fix ability to call focus()/blur() on any view #738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2021

Conversation

appden
Copy link

@appden appden commented Mar 1, 2021

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

This fixes a regression from when we upgraded to 0.63 where we could no longer call focus() or blur() on any View (including Text). This regression was due to a change that dispatches these as commands (to be compatible with Fabric) instead of directly using UIManager to change focus. Only the TextInput supported these commands.

Changelog

[macOS] [Fixed] - Fix ability to call focus()/blur() on any view

Test Plan

Confirmed calling focus() and blur() on View and Text components now work again.

Microsoft Reviewers: Open in CodeFlow

This fixes a regression from when we upgraded to 0.63 where we could no longer call `focus()` or `blur()` on any `View` (including `Text`). This regression was due to a change that dispatches these as commands (to be compatible with Fabric) instead of directly using `UIManager` to change focus. Only the `TextInput` supported these commands.
@appden appden requested a review from alloy as a code owner March 1, 2021 05:24
@appden appden requested a review from rectified95 March 1, 2021 17:48
@HeyImChris HeyImChris merged commit d4530ee into microsoft:master Mar 1, 2021
HeyImChris pushed a commit to HeyImChris/react-native-macos that referenced this pull request Mar 3, 2021
This fixes a regression from when we upgraded to 0.63 where we could no longer call `focus()` or `blur()` on any `View` (including `Text`). This regression was due to a change that dispatches these as commands (to be compatible with Fabric) instead of directly using `UIManager` to change focus. Only the `TextInput` supported these commands.
HeyImChris pushed a commit to HeyImChris/react-native-macos that referenced this pull request Mar 3, 2021
This fixes a regression from when we upgraded to 0.63 where we could no longer call `focus()` or `blur()` on any `View` (including `Text`). This regression was due to a change that dispatches these as commands (to be compatible with Fabric) instead of directly using `UIManager` to change focus. Only the `TextInput` supported these commands.
HeyImChris added a commit that referenced this pull request Mar 3, 2021
* Add nullability checks (#704)

* Update RCTCxxBridge.mm

* add nullability checks

* Fix ability to call focus()/blur() on any view (#738)

This fixes a regression from when we upgraded to 0.63 where we could no longer call `focus()` or `blur()` on any `View` (including `Text`). This regression was due to a change that dispatches these as commands (to be compatible with Fabric) instead of directly using `UIManager` to change focus. Only the `TextInput` supported these commands.

* pod install

* Fix ability to call focus()/blur() on any view (#738)

This fixes a regression from when we upgraded to 0.63 where we could no longer call `focus()` or `blur()` on any `View` (including `Text`). This regression was due to a change that dispatches these as commands (to be compatible with Fabric) instead of directly using `UIManager` to change focus. Only the `TextInput` supported these commands.

Co-authored-by: Scott Kyle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants