software-mansion / react-native-gesture-handler

Declarative API exposing platform native touch and gesture system to React Native.
https://docs.swmansion.com/react-native-gesture-handler/
MIT License
6.13k stars 982 forks source link

[Web] Reset web-exclusive properties when handler is disabled. #3041

Closed m-bert closed 3 months ago

m-bert commented 3 months ago

Description

As mentioned in this comment, it may be confusing that Gesture Handler blocks default events even if it is explicitly disabled. This PR adds styles reset when enabled property changes.

Currently it changes 3 things:

  1. Changes touch-action to default value
  2. Changes user-select to default value
  3. Re-enables context menu usage.

I'm not sure if I missed something. If so, please mention it in a comment.

Test plan

Tested on newly added example.