You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
maxencehenneron
changed the title
pointerEvents='none' does not work properly on Android
pointerEvents='none' blocks scroll events on Android
Nov 17, 2023
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 version1.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.
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)
The text was updated successfully, but these errors were encountered: