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

[BUG] InteractionFlag.enableScrollWheel has no effect #1723

Closed
Tracked by #1529
josxha opened this issue Nov 9, 2023 · 0 comments · Fixed by #1730
Closed
Tracked by #1529

[BUG] InteractionFlag.enableScrollWheel has no effect #1723

josxha opened this issue Nov 9, 2023 · 0 comments · Fixed by #1730
Assignees
Labels
bug This issue reports broken functionality or another error P: 1 (important)
Milestone

Comments

@josxha
Copy link
Contributor

josxha commented Nov 9, 2023

What is the bug?

It's currently not possible to disable scrolling without using a deprecated property.

How can we reproduce it?

  1. Open the Interactive Flags page of the demo app.
  2. Ensure that the "Scroll" checkbox is not checked.
  3. Scroll

Do you have a potential solution?

The deprecated enableScrollWheel proterty defaults to true. The check if the gesture is enabled is performed with an OR operator:

InteractiveFlag.hasFlag(_interactionOptions.flags, InteractiveFlag.scrollWheelZoom) || 
      _interactionOptions.enableScrollWheel

Using false as a default value for InteractionOptions().enableScrollWheel will fix this issue.
Going to create a pull request.

Platforms

all

Severity

Obtrusive: Prevents normal functioning but causes no errors in the console

@josxha josxha added bug This issue reports broken functionality or another error needs triage This new bug report needs reproducing and prioritizing labels Nov 9, 2023
@josxha josxha self-assigned this Nov 9, 2023
josxha added a commit to josxha/flutter_map that referenced this issue Nov 9, 2023
@josxha josxha linked a pull request Nov 9, 2023 that will close this issue
@JaffaKetchup JaffaKetchup linked a pull request Nov 12, 2023 that will close this issue
@JaffaKetchup JaffaKetchup changed the title [BUG] enableScrollWheel interaction flag has no effect [BUG] InteractionFlag.enableScrollWheel has no effect Nov 12, 2023
josxha added a commit to josxha/flutter_map that referenced this issue Nov 21, 2023
@JaffaKetchup JaffaKetchup added P: 1 (important) and removed needs triage This new bug report needs reproducing and prioritizing labels Nov 21, 2023
@josxha josxha added this to the v6.1 milestone Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue reports broken functionality or another error P: 1 (important)
Projects
None yet
2 participants