visgl / visgl/react-map-gl

[Bug] Zoom “jumps” on touchpad scroll in controlled viewState with MapLibre

Open
#2,533 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
8.5k
Forks
1.4k
Avg merge
5d 17h
Merged PRs (30d)
3

Description

Description

When using controlled viewState with MapLibre (as in examples/maplibre/side-by-side), touchpad scroll-zoom stutters: pausing the scroll by lightly resting your fingers, then resuming, causes the zoom to jump.

You can see the flicker in the screenrecording right after the zoom-out/zoom-in pauses:

https://github.com/user-attachments/assets/25a14c3c-5d3f-49c7-bf55-3ae7906b16ff

Expected Behavior

Zoom should continue exactly from the paused level, with no sudden jumps.

Steps to Reproduce

Run examples/maplibre/side-by-side.

On either map perform a two-finger scroll to zoom and release the touchpad to continue scrolling.

Pause midway by touching the touchpad lightly, then continue scrolling.

Environment
  • Framework version: 8.0.4
  • Map library: Maplibre 5.5.0
  • Browser: Firefox 138, Chrome 135, Safari 18.3
  • OS: macOS Sequoia 15.3.1
Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running examples/maplibre/side-by-side and reproduce the touchpad pause-and-resume sequence on either map. Compare the controlled viewState during zoom-out and zoom-in pauses, then verify that zoom continues from the paused level without flicker or jumps in the listed browsers.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.