-
Notifications
You must be signed in to change notification settings - Fork 741
TabController - fix touch events not triggered on real Android device when scrolling with zIndex change #3829
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
TabController - fix touch events not triggered on real Android device when scrolling with zIndex change #3829
Conversation
… when scrolling with zIndex change
✅ PR Description Validation PassedAll required sections are properly filled out:
Your PR is good for review! 🚀 This validation ensures all sections from the PR template are properly filled. |
| return [!asCarousel && styles.page, animatedPageStyle, {width: asCarousel ? containerWidth : undefined}, style]; | ||
| }, [asCarousel, animatedPageStyle, containerWidth, style]); | ||
|
|
||
| if (!isActive && !asCarousel) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By returning null you cancel the TabController behavior of keeping pages "alive" (but hidden)
So each tab change will remount the tab page children
In member view for example, it will load all the page sections and will generally degrade the performance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to opacity + zIndex change in a regular style, seems to work (although it is above the RN warning\error - not sure how it was before).
Need to do some further tests, so change to a draft
ethanshar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but..
I would keep the old code in a comment with a TODO to revert back to it, because this is temp solution
I would also check how this change behave in a complex scenario like member view where we have tab controller with many tabs (wrapped in a CollapsingHeader)
And last, I would create a ticket to revert this once you upgrade to new Reanimated
Lidor has tested it. There is already a lot of commented code so I'm not sure keeping it is the way to go, I did add a TODO ( |
Description
TabController - fix touch events not triggered on real Android device when scrolling with zIndex change
Opened a ticket to reanimated (link).
This is solved in reanimated v4, however we cannot yet migrate to it (and now is not a good time anyway)
Example:
Changelog
TabController - fix touch events not triggered on real Android devicewhen scrolling with zIndex change
Additional info
Ticket 4838