contextmenu event should dissociate right click event from rotate/tilt event
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to implement a right click (long tap on mobile device) event that add a marker unfortunatly, when we rotate / tilt map with the right click button the marker is added too.
```
map.on('contextmenu', function(e) {
console.log(e);
/* adding marker is not a good idea here */
});
```
Expected behavior :
right click / long tap : add the marker
right click move (tilt / rotate) : don't add the marker
I think states could be added to the "map mouse event" to indicate if tilt or rotate occures when contextmenu fired or maybe some other events ? (long tap, right click for exemple)
Tests are done on chrome desktop for now.
I'm also open to any workaround. Thanks,
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
Start from the map.on('contextmenu') event behavior and reproduce the right-click and long-tap cases described in the issue, including rotation and tilt gestures. Trace how those interactions reach the contextmenu handler; done means a stationary right click or long tap can add a marker without firing the marker action after a rotate or tilt gesture.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100