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 pointerEvents, other props on SafeAreaView not working on Android #130

Merged
merged 1 commit into from
Aug 6, 2020

Conversation

hsource
Copy link
Contributor

@hsource hsource commented Jul 26, 2020

Summary

Because SafeAreaViewManager extends ViewGroupManager, some props on <View> that are handled by ReactViewManager and other classes that extend ViewGroupManager aren't handled. Notably, this includes pointerEvents, which can be used to make the SafeAreaView ignore taps when it's used as an overlay.

Test Plan

I installed a branch containing the fix to my own app.

To test this, create an instance of <SafeAreaView style={{ flex: 1 }} pointerEvents="box-none"> that overlays a button or map. The button should be tappable and the map should be pannable.

Before After
Before After

Copy link
Member

@janicduplessis janicduplessis left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for the fix

@Willham12
Copy link

@janicduplessis seems we have the same issue with 4.1.2

@janicduplessis
Copy link
Member

I see, we’re no longer extending ReactViewGroupManager in 4.0, and it seems a bit harder to do now with support for new architecture, I’ll have a look.

@janicduplessis
Copy link
Member

@Willham12 Should be fixed in 4.1.4

@account-mhj
Copy link

account-mhj commented Feb 20, 2023

@janicduplessis SafeAreaProvider has same problems. Properties like pointerEvent wil not work unless replacing ViewGroupManager by ReactViewManager in SafeAreaProviderManager .

@chj-damon
Copy link

@janicduplessis SafeAreaProvider has same problems. Properties like pointerEvent wil not work unless replacing ViewGroupManager by ReactViewManager in SafeAreaProviderManager .
@janicduplessis would you mind take a loot at this?

@chj-damon
Copy link

@account-mhj have you solved this problem?

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.

None yet

5 participants