Skip to content
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

[Fabric] Return active touch identifiers in surface touch handler on mouse up. #1815

Merged
merged 1 commit into from
May 4, 2023

Conversation

lenaic
Copy link

@lenaic lenaic commented May 4, 2023

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

There are 11 active touch identifiers available in the surface touch handler. We were not returning identifiers when completing a touch on mouse up which led to the app hanging looking for a free touch identifier when all 11 slots were used up.

Changelog

[macOS] [FIXED] - App hanging after multiple clicks in fabric

Test Plan

Tested by running RNTester on macOS with fabric (RCT_NEW_ARCH_ENABLED=1) and clicking around the app to check that the app doesn't hang anymore after a couple of click.

Without the fix RNTester becomes unresponsive (the beachball at the end is not captured by the screen recording):

Screen.Recording.2023-05-04.at.17.23.15-1.mov

With the fix RNTester keeps working no matter how many times you click around:

Screen.Recording.2023-05-04.at.16.26.33-1.mov

@lenaic lenaic requested a review from a team as a code owner May 4, 2023 15:29
@Saadnajmi Saadnajmi merged commit a72d3e5 into microsoft:main May 4, 2023
@lenaic lenaic deleted the fabric/fix-click-hangs branch May 5, 2023 00:33
lenaic added a commit to lenaic/react-native-macos that referenced this pull request Aug 7, 2023
Saadnajmi pushed a commit that referenced this pull request Aug 7, 2023
* [Fabric] Return active touch identifiers in surface touch handler on mouse up. (#1815)

Co-authored-by: Nick <lefever@meta.com>

* [Fabric] Add mandatory color space conversion for macOS. (#1813)

Co-authored-by: Nick <lefever@meta.com>

* [Fabric] Clean up hit testing now that RCTUIView extends RCTPlatformView (#1814)

* Clean up surface touch handler now that RCTUIView extends RCTPlatformView.

* Fix the iOS build.

---------

Co-authored-by: Nick <lefever@meta.com>

* [Fabric] Use the layout metrics to get the scale factor in component views. (#1816)

* Use the layout metrics to get the scale factor in component views.

* Use layout metrics pointScaleFactor instead of RCTScreenScale on iOS.

---------

Co-authored-by: Nick <lefever@meta.com>

* Fix RNTester content not resizing with window. (#1818)

Co-authored-by: Nick <lefever@meta.com>

* Fix wrong text offset when a line height is set. (#1819)

Co-authored-by: Nick <lefever@meta.com>

* [Fabric] Fix scroll views hiding content underneath them in Fabric. (#1820)

* Fix scroll views hiding content underneath them in Fabric.

* Clean up Paper scroll view after shim scroll view fix.

---------

Co-authored-by: Nick <lefever@meta.com>

* [Fabric] Add support for image content mode and tint features (#1828)

* Add RCTUIImageView to RCTUIKit to support iOS features on macOS.

* Add support for tint and resize mode to Image on Fabric.

* Clean up logging and add macOS tag.

* Fix code style to match the style guide.

---------

Co-authored-by: Nick <lefever@meta.com>

* [Fabric] Fix text input rendering crashing by using layout metrics pixelScaleFactor (#1817)

* Use layout metrics to assign the active scale factor to RCTUITextField.

* Use layout metrics to assign the active scale factor to RCTUITextView.

---------

Co-authored-by: Nick <lefever@meta.com>

* [Fabric] Tint images using CIFilter fixing wrong tinted image size (#1843)

* Tint images using CIFilter to fix wrong image size when enabling tinting.

* Initialize the CIFilter input values with default values.

---------

Co-authored-by: Nick <lefever@meta.com>

---------

Co-authored-by: Nick <lefever@meta.com>
shwanton pushed a commit to shwanton/react-native-macos that referenced this pull request Apr 26, 2024
…andler on mouse up. (microsoft#1815)

Summary:
This stack picks all fabric changes merged on RN 0.71 macOS that have no side-effects on paper.

Cherry-pick of Fabric fixes:
microsoft#1815

Test Plan: Tested later in this stack.

Reviewers: chpurrer, #rn-desktop

Reviewed By: chpurrer

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

Tasks: T158583598

# Conflicts:
#	packages/react-native/React/Fabric/RCTSurfacePointerHandler.mm
shwanton pushed a commit to shwanton/react-native-macos that referenced this pull request Apr 26, 2024
…mouse up. (microsoft#1815)

Summary:
This stack picks all fabric changes merged on RN 0.71 macOS that have no side-effects on paper.

Cherry-pick of Fabric fixes:
microsoft#1815

Test Plan: Tested later in this stack.

Reviewers: chpurrer, #rn-desktop

Reviewed By: chpurrer

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

Tasks: T158583598

# Conflicts:
#	packages/react-native/React/Fabric/RCTSurfacePointerHandler.mm
shwanton pushed a commit to shwanton/react-native-macos that referenced this pull request Apr 28, 2024
…ch handler on mouse up. (microsoft#1815)

Summary:
This stack picks all fabric changes merged on RN 0.71 macOS that have no side-effects on paper.

Cherry-pick of Fabric fixes:
microsoft#1815

Test Plan: Tested later in this stack.

Reviewers: chpurrer, #rn-desktop

Reviewed By: chpurrer

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

Tasks: T158583598

# Conflicts:
#	React/Fabric/RCTSurfaceTouchHandler.mm
shwanton pushed a commit to shwanton/react-native-macos that referenced this pull request May 2, 2024
…ch handler on mouse up. (microsoft#1815)

Summary:
This stack picks all fabric changes merged on RN 0.71 macOS that have no side-effects on paper.

Cherry-pick of Fabric fixes:
microsoft#1815

Test Plan: Tested later in this stack.

Reviewers: chpurrer, #rn-desktop

Reviewed By: chpurrer

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

Tasks: T158583598

# Conflicts:
#	React/Fabric/RCTSurfaceTouchHandler.mm
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