-
Notifications
You must be signed in to change notification settings - Fork 25k
[ListView] Fix RCTScrollView stickyHeader touch passing. #2224
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
Conversation
|
@nicklockwood @brentvatne I believe this modifies code that was last touched by you guys, please take a look. Thanks! |
React/Views/RCTScrollView.m
Outdated
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.
Could change __block UIView *stickyHeader to __block UIView *hitView and set it inside the enumeration loop, avoiding an extra hitTest: call at the end of this method.
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.
Oh yeah, I missed that bit. That's the problem. Let me update this.
|
Out of scope of this diff but I'm wondering if it's more correct to override |
|
Told @ide that I figured this line of code would be frowned upon, so I broke it out a bit more. |
12f84d6 to
46da788
Compare
…en passed to the stickyHeaders hitTest:withEvent: method in order to be correctly routed to any subviews of the stickyHeader. More performant fix. Fix tabs.
|
@MattFoley that line would have randomly failed if the pointer address of hitView was ever exactly divisible by 128, which probably wasn't what you intended :-) (assigning a pointer to a BOOL variable just truncates the value to fit inside a char, it doesn't check if it's != 0 like normal boolean operations such as if, ?, ! do) |
|
I had no idea, that's a cool tidbit. Thanks @nicklockwood. |
|
This looks good to me. @nicklockwood can you import this if it looks good to you too? |
This PR configures Component Governance to ignore the helloworld package, which is an internal template that is not used.
Point must be converted to the stickyHeader's coordinate space and then passed to the stickyHeaders hitTest:withEvent: method in order to be correctly routed to any subviews of the stickyHeader.
This resolves this issue.