-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
contextmenu event should dissociate right click event from rotate/tilt event #8824
Comments
I tried reproducing this by adding the event logging to a page containing just the map (debug/index.html) and I'm not able to reproduce the problem. For me the context event fires only when the map isn't rotated or tilted. I'm trying with Chrome and a trackpad Can you check that you are on the latest mapbox-gl-js and create a jsfiddle with the exact example that reproduces the issue for you? Thanks! |
Here you go, still occurs with v1.4.0 : https://jsfiddle.net/z92tnvdp/ Test drive : I expect the right click to act just like the left click (click or move the map is not the same event). Thanks, |
I tried this in Firefox and Chrome and couldn't reproduce the behavior you're describing. A regular right click adds the marker, while right-click + pan tilts and rotates the map, but does not add a marker. |
Did you try on the jsfiddle ? The problem is the same on our app or on the jsfiddle. |
@Dahkon yes, I used your JSFiddle. What browser versions are you using? |
That is the behavior I'm observing. Once the tilt/rotatehandler kicks in, no icon is added. |
Browsers are UP to date but I tried on severals pc (not on mac). Same behavior. |
that was the missing piece. I assume with PC you mean Windows. I just tried your JSFiddle on Windows 10 in Chrome 78, Firefox 70, Edge 44, and IE 11 and could reproduce this behavior both with a trackpad and with an external mouse. |
Yes Windows 10, 8.1 and 7 (not tested under). Sorry I should have said that earlier. |
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.
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,
The text was updated successfully, but these errors were encountered: