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(fabric): prevent freeze on layout update during transition #936

Merged
merged 1 commit into from
Nov 30, 2024

Conversation

krozniata
Copy link
Member

@krozniata krozniata commented Nov 29, 2024

Summary

This PR fixes issue causing component to freeze when layout was updated during transition

When layout was updated e.g. because of hiding keyboard, setViewControllers completion block was never called, which resulted in swipe being disabled

It fixes this issue by preventing layout update during transition phase and updating it after transition ends

Test Plan

  1. Build the example app.
  2. Go to the Keyboard Example menu.
  3. Touch the TextInput to show the keyboard.
  4. Press the Next page button. (might be required to modify ControlPanel to move button above keyboard)
  5. Should navigate correctly, should be able to interact

Other examples should work as before

Compatibility

OS Implemented
iOS
Android

Copy link
Collaborator

@MrRefactor MrRefactor left a comment

Choose a reason for hiding this comment

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

LGTM, is that issue Fabric only?

@floydkim
Copy link

floydkim commented Nov 30, 2024

Thank you for fixing the issue so quickly.

@MrRefactor this problem also occurs on Paper.
My bad. I didn’t include it in the issue description.

@troZee
Copy link
Member

troZee commented Nov 30, 2024

@floydkim could you test that fix on your end ?

@floydkim
Copy link

@troZee Sure, but my app runs on Paper, so I can’t apply this fix directly. Instead, I’ll test it with the example app.

@floydkim
Copy link

floydkim commented Nov 30, 2024

tested on fix/layout-freeze branch

Issue has been resolved on Fabric.

Paper (Sim.) Fabric (Sim.) Fabric (real device)
6.6.0-repro-paper.mp4
6.6.0-repro-fabric-2.mp4
6.6.0-repro-fabric-realde.ice.mov

@krozniata krozniata changed the title fix: prevent freeze on layout update during transition fix(fabric): prevent freeze on layout update during transition Nov 30, 2024
@MrRefactor MrRefactor merged commit 421c4ba into master Nov 30, 2024
2 checks passed
@MrRefactor MrRefactor deleted the fix/layout-freeze branch November 30, 2024 15:40
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