Is there an existing issue for this?
Describe the issue
There's a box-none value in RN web but currently it's implemented incorrectly. Currently the child elements of it 's implemented like parent > *: { pointer-events: auto } (see here) which only affects direct children. So the grand-children will still inherit the pointer-events: none
Expected behavior
All components inside parent that has pointer-events: box-none should be pointer-events: auto
Steps to reproduce
- Create the container View that has
pointer-events: none
- Inside that View, create the child View that has
pointer-events: box-none
- Inside child View, create the View within onClick function
- Observe that onClick function is not trigger
Test case
https://codesandbox.io/s/crazy-chihiro-yz9y4k
Additional comments
No response
Proposed solution
Update to the pattern parent *: { pointer-events: auto } so it affects all children. That means updating the >* to * in this line
This is recommended in the RN doc as well https://reactnative.dev/docs/view#pointerevents.
Is there an existing issue for this?
Describe the issue
There's a box-none value in RN web but currently it's implemented incorrectly. Currently the child elements of it 's implemented like parent > *: { pointer-events: auto } (see here) which only affects direct children. So the grand-children will still inherit the pointer-events: none
Expected behavior
All components inside parent that has
pointer-events: box-noneshould bepointer-events: autoSteps to reproduce
pointer-events: nonepointer-events: box-noneTest case
https://codesandbox.io/s/crazy-chihiro-yz9y4k
Additional comments
No response
Proposed solution
Update to the pattern
parent *: { pointer-events: auto }so it affects all children. That means updating the>*to*in this lineThis is recommended in the RN doc as well https://reactnative.dev/docs/view#pointerevents.