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

Do not destroy views when there is a touch going on for New Architecture #45865

Closed
wants to merge 1 commit into from

Conversation

cortinico
Copy link
Contributor

@cortinico cortinico commented Aug 1, 2024

Summary:
This diff introduces the logic to defer the destruction of ViewState (and EventEmitter) for views that are currently touched on by the user. The idea is to let the UIManager know which view is currently active from the JSTouchDispatcher and eventually defer the view deletion till the view is not interacted anymore.

The JSTouchDispatcher already retains the information on which tag was the touch originally fired.
We'll pass over that information to the UIManager/SurfaceMountingManager so that it can be accounted for when the view has to be deleted.

This is causing a couple of bad bugs on Android:

Fixes #45126
Fixes #44610
Closes #45675

Changelog:
[Android] [Fixed] - Do not destroy views when there is a touch going on for New Architecture

Differential Revision: D60594878

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Aug 1, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60594878

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60594878

cortinico added a commit to cortinico/react-native that referenced this pull request Aug 7, 2024
…ure (facebook#45865)

Summary:
Pull Request resolved: facebook#45865

This diff introduces the logic to defer the destruction of ViewState (and EventEmitter) for views that are currently touched on by the user. The idea is to let the UIManager know which view is currently active from the `JSTouchDispatcher` and eventually defer the view deletion till the view is not interacted anymore.

The JSTouchDispatcher already retains the information on which tag was the touch originally fired.
We'll pass over that information to the UIManager/SurfaceMountingManager so that it can be accounted for when the view has to be deleted.

This is causing a couple of bad bugs on Android:

Fixes facebook#45126
Fixes facebook#44610
Closes facebook#45675

Changelog:
[Android] [Fixed] - Do not destroy views when there is a touch going on for New Architecture

Differential Revision: D60594878
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60594878

cortinico added a commit to cortinico/react-native that referenced this pull request Aug 7, 2024
…ure (facebook#45865)

Summary:
Pull Request resolved: facebook#45865

This diff introduces the logic to defer the destruction of ViewState (and EventEmitter) for views that are currently touched on by the user. The idea is to let the UIManager know which view is currently active from the `JSTouchDispatcher` and eventually defer the view deletion till the view is not interacted anymore.

The JSTouchDispatcher already retains the information on which tag was the touch originally fired.
We'll pass over that information to the UIManager/SurfaceMountingManager so that it can be accounted for when the view has to be deleted.

This is causing a couple of bad bugs on Android:

Fixes facebook#45126
Fixes facebook#44610
Closes facebook#45675

Changelog:
[Android] [Fixed] - Do not destroy views when there is a touch going on for New Architecture

Differential Revision: D60594878
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60594878

cortinico added a commit to cortinico/react-native that referenced this pull request Aug 8, 2024
…ure (facebook#45865)

Summary:
Pull Request resolved: facebook#45865

This diff introduces the logic to defer the destruction of ViewState (and EventEmitter) for views that are currently touched on by the user. The idea is to let the UIManager know which view is currently active from the `JSTouchDispatcher` and eventually defer the view deletion till the view is not interacted anymore.

The JSTouchDispatcher already retains the information on which tag was the touch originally fired.
We'll pass over that information to the UIManager/SurfaceMountingManager so that it can be accounted for when the view has to be deleted.

This is causing a couple of bad bugs on Android:

Fixes facebook#45126
Fixes facebook#44610
Closes facebook#45675

Changelog:
[Android] [Fixed] - Do not destroy views when there is a touch going on for New Architecture

Reviewed By: mdvacca

Differential Revision: D60594878
…ure (facebook#45865)

Summary:
Pull Request resolved: facebook#45865

This diff introduces the logic to defer the destruction of ViewState (and EventEmitter) for views that are currently touched on by the user. The idea is to let the UIManager know which view is currently active from the `JSTouchDispatcher` and eventually defer the view deletion till the view is not interacted anymore.

The JSTouchDispatcher already retains the information on which tag was the touch originally fired.
We'll pass over that information to the UIManager/SurfaceMountingManager so that it can be accounted for when the view has to be deleted.

This is causing a couple of bad bugs on Android:

Fixes facebook#45126
Fixes facebook#44610
Closes facebook#45675

Changelog:
[Android] [Fixed] - Do not destroy views when there is a touch going on for New Architecture

Reviewed By: mdvacca

Differential Revision: D60594878
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60594878

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Aug 8, 2024
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 6b7f682.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @cortinico in 6b7f682

When will my fix make it into a release? | How to file a pick request?

@peaktan
Copy link

peaktan commented Dec 24, 2024

@cortinico Hello, We have also encountered this kind of problem. Many users reported that the page stopped responding when using it. Since we are using version 0.74.1 and the user base is very large, we cannot upgrade to version 0.76 quickly。would you like to ask if this fix fixes some of the following related issues:

@cortinico
Copy link
Contributor Author

Since we are using version 0.74.1 and the user base is very large, we cannot upgrade to version 0.76 quickly。would you like to ask if this fix fixes some of the following related issues:

@peaktan I'm not entirely sure as those issues you linked are really broad, and users reported problems coming from other libraries (e.g. react-native-screens). The fix for this specific behavior was included in 0.76 and we suggest you to upgrade as soon as possible to get the latest fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
4 participants