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

pointerEvents='none' blocks scroll events on Android #1988

Open
maxencehenneron opened this issue Nov 17, 2023 · 3 comments
Open

pointerEvents='none' blocks scroll events on Android #1988

maxencehenneron opened this issue Nov 17, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@maxencehenneron
Copy link

maxencehenneron commented Nov 17, 2023

Description

When setting pointerEvents='none' on a <Canvas>, tap events do work but not scroll events. I'm using a Canvas that sits on top the whole app (absolute position) to display firework/particle animations.

Reverting this commit solves the issue: #1236

As a workaround, I currently wrap the Canvas in a standard <View> that has pointerEvents='none'.

Version

0.1.219

Steps to reproduce

Add a Canvas in absolute position over a Flatlist or Scrollview, set pointerEvents='none' on the canvas

Snack, code example, screenshot, or link to a repository

https://snack.expo.dev/@dernise/canvas-pointerevents?platform=android

(Unfortunately couldn't get the snack to load react-native-reanimated)

@maxencehenneron maxencehenneron added the bug Something isn't working label Nov 17, 2023
@maxencehenneron maxencehenneron changed the title pointerEvents='none' does not work properly on Android pointerEvents='none' blocks scroll events on Android Nov 17, 2023
@mousab-issa
Copy link

Any update on this issue ?

@CptFabulouso
Copy link

You say tap events are working for you on 0.1.219, but it my tests they are broken since 0.1.218, latest working is 0.1.216. I made this snack, where button behind a Canvas is not clickable, but if you set version of expo to 48, button is clickable again.
I've made an Android prebuild with expo 48 and found out the issue appeared in version 0.1.218.
Also tried the newest version 1.0.4 and the issues is still there.
There are a lot of changes between 0.1.216 and 0.1.218 and I don' see what's the cause. Anyway even reverting the mentioned commit did not solve it for me.

FlatList or ScrollView can't be scrolled with 0.1.216 thought (or 0.1.172, which is default for Expo 48). But it might be similar issue.

After hours of looking into this I read you workaround and I swear that's the first thing I've tried and it did not work. Now it works. I have conflicting emotions of happiness and sadness.

@vinayaksaubhri
Copy link

Any update on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants