After some recent update on google Maps Javascript V3 API, I noticed that contextmenu started being shown when i make a rightclick on a marker. Basically the code is
google.maps.event.addListener(marker, 'rightclick', function (event) {
foo(marker);
});
I have already tried the option
google.maps.event.addListener(marker, 'rightclick', function (event) {
deleteMarker(marker);
event.stop();
return false;
});
But the context menu still continue to appear. I also put this on the whole map
$("#map").contextmenu(function (e) {
e.preventDefault();
e.stopPropagation();
return false;
});
And, rightly, contextmenu doesn't appear when clicking on map. How can I stop if also on marker rightclick?
This is an example for the issue: https://jsfiddle.net/rnxLum5j/