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

Fix crash when navigating away from screens #46559

Closed
wants to merge 1 commit into from

Conversation

cipolleschi
Copy link
Contributor

Summary:
There is an edge case when we navigate away from a screen that contains a scroll view where one of the UISCrollViewDelegates does not implement the scrollViewDidEndDecelerating method.

This happens because the Macro used assumes that the event that we are forwarding is the actual method from where the macro is called. Which is not true when it comes to didMoveToWindow.

This change fixes that by explicitly expanding the macro in this scenario and passing the right selector.

Changelog:

[iOS][Fixed] - Fixed a crash when navigating away from a screen that contains a scrollView

Facebook

This should fix T201780472

Differential Revision: D62935876

@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 Sep 18, 2024
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 18, 2024
Summary:
Pull Request resolved: facebook#46559

There is an edge case when we navigate away from a screen that contains a scroll view where one of the UISCrollViewDelegates does not implement the scrollViewDidEndDecelerating method.

This happens because the Macro used assumes that the event that we are forwarding is the actual method from where the macro is called. Which is not true when it comes to `didMoveToWindow`.

This change fixes that by explicitly expanding the macro in this scenario and passing the right selector.

## Changelog:
[iOS][Fixed] - Fixed a crash when navigating away from a screen that contains a scrollView

## Facebook
This should fix T201780472

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

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

cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 18, 2024
Summary:
Pull Request resolved: facebook#46559

There is an edge case when we navigate away from a screen that contains a scroll view where one of the UISCrollViewDelegates does not implement the scrollViewDidEndDecelerating method.

This happens because the Macro used assumes that the event that we are forwarding is the actual method from where the macro is called. Which is not true when it comes to `didMoveToWindow`.

This change fixes that by explicitly expanding the macro in this scenario and passing the right selector.

## Changelog:
[iOS][Fixed] - Fixed a crash when navigating away from a screen that contains a scrollView

## Facebook
This should fix T201780472

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

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

cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 18, 2024
Summary:
Pull Request resolved: facebook#46559

There is an edge case when we navigate away from a screen that contains a scroll view where one of the UISCrollViewDelegates does not implement the scrollViewDidEndDecelerating method.

This happens because the Macro used assumes that the event that we are forwarding is the actual method from where the macro is called. Which is not true when it comes to `didMoveToWindow`.

This change fixes that by explicitly expanding the macro in this scenario and passing the right selector.

## Changelog:
[iOS][Fixed] - Fixed a crash when navigating away from a screen that contains a scrollView

## Facebook
This should fix T201780472

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

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

cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 19, 2024
Summary:
Pull Request resolved: facebook#46559

There is an edge case when we navigate away from a screen that contains a scroll view where one of the UISCrollViewDelegates does not implement the scrollViewDidEndDecelerating method.

This happens because the Macro used assumes that the event that we are forwarding is the actual method from where the macro is called. Which is not true when it comes to `didMoveToWindow`.

This change fixes that by explicitly expanding the macro in this scenario and passing the right selector.

## Changelog:
[iOS][Fixed] - Fixed a crash when navigating away from a screen that contains a scrollView

## Facebook
This should fix T201780472

Reviewed By: philIip

Differential Revision: D62935876
Summary:
Pull Request resolved: facebook#46559

There is an edge case when we navigate away from a screen that contains a scroll view where one of the UISCrollViewDelegates does not implement the scrollViewDidEndDecelerating method.

This happens because the Macro used assumes that the event that we are forwarding is the actual method from where the macro is called. Which is not true when it comes to `didMoveToWindow`.

This change fixes that by explicitly expanding the macro in this scenario and passing the right selector.

## Changelog:
[iOS][Fixed] - Fixed a crash when navigating away from a screen that contains a scrollView

## Facebook
This should fix T201780472

Reviewed By: philIip

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

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in c6f3282.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @cipolleschi in c6f3282

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

blakef pushed a commit that referenced this pull request Sep 23, 2024
Summary:
Pull Request resolved: #46559

There is an edge case when we navigate away from a screen that contains a scroll view where one of the UISCrollViewDelegates does not implement the scrollViewDidEndDecelerating method.

This happens because the Macro used assumes that the event that we are forwarding is the actual method from where the macro is called. Which is not true when it comes to `didMoveToWindow`.

This change fixes that by explicitly expanding the macro in this scenario and passing the right selector.

## Changelog:
[iOS][Fixed] - Fixed a crash when navigating away from a screen that contains a scrollView

## Facebook
This should fix T201780472

Reviewed By: philIip

Differential Revision: D62935876

fbshipit-source-id: e29aadf201c8066b5d3b7b0ada21fa8d763e9af0
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
Development

Successfully merging this pull request may close these issues.

3 participants