forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add onMouseEnter and onMouseLeave to Text (cherry-picked from 0.73-st…
…able) (#2149) * [0.73-stable] New events for RCTUIView (#2137) * Move mouse events from RCTView to superclass RCTUIView * Add focus and responder events * Move mouse event implementations to RCTUIView class --------- Co-authored-by: Adam Gleitman <adgleitm@microsoft.com> * [0.73-stable] Add mouse hover events to `RCTTextView` (#2143) * Initial implementation * Refactor and dedupe some code * Basic error handling * Clarify comment about mousemove order * Cleanup: enumerate all text attributes at once instead of doing multiple passes * Use *shadow* view traversal for handling nested mouse events * Remove potentially confusing comment * descendantViewTags doesn't need to worry about duplicates * Distinguish between embedded views and virtual text subviews * Scope _virtualSubviews to macOS only * nit: use separate #if blocks for `setTextStorage:...` and `getRectForCharRange:` inclusions * TARGET_OS_OSX blocks for virtualSubviewTags * Remove #if TARGET_OS_OSX blocks, since these changes are potentially upstreamable * Clarify a TODO --------- Co-authored-by: Adam Gleitman <adgleitm@microsoft.com> * Add an example for Text mouse hover events * Add missing macOS props to Text.d.ts * Fix flow errors * Fix lint errors --------- Co-authored-by: Adam Gleitman <adgleitm@microsoft.com>
- Loading branch information
1 parent
73cdf93
commit 10b1cd8
Showing
12 changed files
with
446 additions
and
176 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.