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

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

Merged
merged 8 commits into from
Aug 12, 2024

Conversation

m-bert
Copy link
Contributor

@m-bert m-bert commented Aug 11, 2024

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.

src/web/handlers/GestureHandler.ts Outdated Show resolved Hide resolved
src/web/tools/GestureHandlerWebDelegate.ts Outdated Show resolved Hide resolved
src/web/tools/GestureHandlerWebDelegate.ts Outdated Show resolved Hide resolved
src/web/handlers/GestureHandler.ts Outdated Show resolved Hide resolved
src/web/tools/GestureHandlerWebDelegate.ts Outdated Show resolved Hide resolved
@m-bert m-bert requested a review from j-piasecki August 12, 2024 08:17
@m-bert m-bert requested a review from j-piasecki August 12, 2024 10:48
@m-bert m-bert merged commit f48d46c into main Aug 12, 2024
3 checks passed
@m-bert m-bert deleted the @mbert/reset-styles-when-disbaled branch August 12, 2024 12:31
m-bert added a commit that referenced this pull request Aug 26, 2024
## Description

#3041 introduced a regression - calling `updateGestureConfig` resulted
in `NativeViewGestureHandler` having `touchAction: none;` even though it
shouldn't. Because of that our example app didn't scroll.

## Test plan

Check that example app is scrolling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants