Map rotation/pitch not performed on rapid successive right clicks
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**: v2.15.0
**browser**: Chrome Version 114.0.5735.199
**OS**: Windows 11 Pro 22H2 22621.1992
### Steps to Trigger Behavior
1. Start rotating the map
2. Quickly let go of RMB and start another rotation by RMB
3. Rotation/pitch are not performed, although RMB is held down and the mouse is moving
### Link to Demonstration
https://jsfiddle.net/6sdht8je/3/
Demo:
https://github.com/mapbox/mapbox-gl-js/assets/11539004/370d12b7-70c4-4d43-b4f0-325eabd65864
### Expected Behavior
Rotation/pitch continues and follows mouse movements.
### Actual Behavior
Rotation/pitch is stopped until the RMB is let go.
#### Notes
As you may see on the recording, this doesn't always trigger. The event console logs may indicate the reason behind this behavior: the rotate/pitch end events get triggered regardless of the mousedown event not being directly followed by a mouseup event.

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the rapid right-click sequence in the linked JSFiddle and compare the event console logs, especially the rotate/pitch end events. Confirm the fix by repeating the sequence and verifying that rotation and pitch continue while RMB is held and the mouse moves.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100