ContextMenu event is not triggered anymore on a long press on mobile since v1.10
@ansis is already working on this.
Since Dec 10, 2020.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**: 1.10 and later
**browser**: Android Chrome 87
### Steps to Trigger Behavior
1. declare a contextmenu event on a map
2. do a long touch on a mobile device
3. contenumenu event is not trigerred anymore since mapbox version 1.10 (it works on v1.9)
### Link to Demonstration
```
mapboxgl.accessToken = 'token';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
})
map.on('contextmenu', () => alert('contextmenu event works'))
```
With mapbox in version 1.9, an alert will be shown if you « long touch » the map on a mobile device.
However, since v1.10 (and until 2.0), the alert won’t be displayed on a long touch on a mobile device.
### Expected Behavior
ContextMenu event is trigerred on a mobile device on a long press.
### Actual Behavior
ContextMenu event is not trigerred on a mobile device on a long press (it works on version 1.9).
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.
Assessment
This issue has not been assessed yet.