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
While working on the bump we've noticed that pointerEvents behaviour has changed causing multiple strange bugs in the app. After an investigation I noticed that in many places the pointerEvents got overridden by other inherited values.
After creating a minimal reproduction I discovered that the pointerEventsworked correctly in the previous version. However they must have been passed to components via StyleSheet.create(). When passed by inline styling or a JavaScript object, box-none nor box-only properties were not applied.
The previous version worked correctly, because even when passing the pointer-event only to the closest children via > * CSS was taking care of everything via inheritance.
Screen.Recording.2025-08-22.at.11.47.10.mov
Expected behavior
Passing the pointerEvents property should behave the same no matter if passed by StyleSheet.create() or inline styling.
What's more I believe that the previous StyleSheet.create() implementation should be brought back, since it worked as I would expect:
<View style={styles.pointerEventsNone}> // none
<View style={styles.pointerEventsBoxNone}> // none
// From here we should have 'auto'
<View>
<View
onClick={() => {
console.log("Should work");
}}
/>
</View>
</View>
</View>
The only thing would be to make sure the same logic as in StyleSheet/compiler/index was applied for any other way of styling.
Steps to reproduce
Inline styling bug
Add a View with inline style={{ pointerEvents: 'box-none'}}
Open Elements in the Inspector and notice that the style was not applied
Wrong propagation
Add a View with style={{ pointerEvents: 'none'}} (created via StyleSheet.create())
Nest another View with style={{ pointerEvents: 'box-none'}} (created via StyleSheet.create())
Nest one more View with an onPress
The onPress should be triggered, since its parent has box-none value, therefore its children should get pointerEvents: 'auto' following heuristic that descendants should inherit from the closest ancestor.
Is there an existing issue for this?
Describe the issue
While working on the bump we've noticed that
pointerEventsbehaviour has changed causing multiple strange bugs in the app. After an investigation I noticed that in many places thepointerEventsgot overridden by other inherited values.After creating a minimal reproduction I discovered that the
pointerEventsworked correctly in the previous version. However they must have been passed to components viaStyleSheet.create(). When passed by inline styling or a JavaScript object,box-nonenorbox-onlyproperties were not applied.The previous version worked correctly, because even when passing the
pointer-eventonly to the closest children via> *CSS was taking care of everything via inheritance.Screen.Recording.2025-08-22.at.11.47.10.mov
Expected behavior
Passing the
pointerEventsproperty should behave the same no matter if passed byStyleSheet.create()or inline styling.What's more I believe that the previous StyleSheet.create() implementation should be brought back, since it worked as I would expect:
The only thing would be to make sure the same logic as in StyleSheet/compiler/index was applied for any other way of styling.
Steps to reproduce
Inline styling bug
Viewwith inlinestyle={{ pointerEvents: 'box-none'}}Elementsin the Inspector and notice that the style was not appliedWrong propagation
Viewwithstyle={{ pointerEvents: 'none'}}(created viaStyleSheet.create())Viewwithstyle={{ pointerEvents: 'box-none'}}(created viaStyleSheet.create())Viewwith anonPressonPressshould be triggered, since its parent hasbox-nonevalue, therefore its children should getpointerEvents: 'auto'following heuristic that descendants should inherit from the closest ancestor.Test case
https://codesandbox.io/p/sandbox/condescending-wildflower-z6vzpv
Additional comments
react-native-webv0.20.0 reproduction - The event get triggered only when passingpointerEventsviaStyleSheet.create()react-native-webv0.21.1 reproduction - In both cases the buttons don't work while they shouldnonevalue