Skip to content

Conversation

@tom-un
Copy link
Collaborator

@tom-un tom-un commented Jul 21, 2020

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 is the same PR made to master #506 cherry-picked into the 0.60-stable branch.

It fixes onFocus/onBlur events on <View> and <TextView> components so that the events bubble up the component hierarchy in the same way they do on the web and on react-native-windows.

Besides just the cherry-pick of the commit on master, the static xcodeproj's that no longer exist in master had to be updated with references to the new RCTFocusChangeEvent.m/h file.

Changelog

[macOS] [Fixed] - Fix onFocus/onBlur event bubbling in 0.60 stable

Test Plan

The existing FocusEventExample was extended to include examples using <Text> elements, <Buttons>, and cases where the onFocus and onBlur handlers were on various combinations of ancestor components, the focusable components themselves and both.

Microsoft Reviewers: Open in CodeFlow

tom-un and others added 2 commits July 20, 2020 16:22
* Update scripts to publish react-native-macos-init

* Clean up merge markers

* Restored ios:macos RNTester parity except for InputAccessoryView.

* Revert "Restored ios:macos RNTester parity except for InputAccessoryView."

This reverts commit 5a67ae0.

* Remove unnecessary android builds and tar file upload.

* Fix onFocus/onBlur View events to properly bubble.

* The Text component can also be selectable={true} and needs the same focus/blur event triggering as View.

Co-authored-by: React-Native Bot <[email protected]>
@tom-un tom-un requested review from HeyImChris and acoates-ms July 21, 2020 00:22
@pull-bot
Copy link

pull-bot commented Jul 21, 2020

Warnings
⚠️

❔ Base Branch - The base branch for this PR is something other than master. Are you sure you want to merge these changes into a stable release? If you are interested in backporting updates to an older release, the suggested approach is to land those changes on master first and then cherry-pick the commits into the branch for that release. The Releases Guide has more information.

Messages
📖

📋 Verify Changelog Format - A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

CATEGORY may be:
  • General
  • iOS
  • Android
  • JavaScript
  • Internal (for changes that do not need to be called out in the release notes)

TYPE may be:

  • Added, for new features.
  • Changed, for changes in existing functionality.
  • Deprecated, for soon-to-be removed features.
  • Removed, for now removed features.
  • Fixed, for any bug fixes.
  • Security, in case of vulnerabilities.

MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

Generated by 🚫 dangerJS against 4d2070e

Copy link

@mganandraj mganandraj left a comment

Choose a reason for hiding this comment

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

:shipit:

@tom-un tom-un merged commit d44af5a into microsoft:0.60-stable Jul 21, 2020
HeyImChris pushed a commit to HeyImChris/react-native-macos that referenced this pull request Aug 17, 2020
* Fix onFocus/onBlur event bubbling (microsoft#506)

* Update scripts to publish react-native-macos-init

* Clean up merge markers

* Restored ios:macos RNTester parity except for InputAccessoryView.

* Revert "Restored ios:macos RNTester parity except for InputAccessoryView."

This reverts commit 5a67ae0.

* Remove unnecessary android builds and tar file upload.

* Fix onFocus/onBlur View events to properly bubble.

* The Text component can also be selectable={true} and needs the same focus/blur event triggering as View.

Co-authored-by: React-Native Bot <[email protected]>

* Added new RCTFocusChangeEvent to static xcodeproj's

* Change vmImage to ubuntu-latest for Android builds.

Co-authored-by: React-Native Bot <[email protected]>
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.

4 participants