nikeshydav / gmaps-samples-v3

Automatically exported from code.google.com/p/gmaps-samples-v3
0 stars 0 forks source link

Clicking on custommarker fires map's click event before marker can stop it #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to
http://gmaps-samples-v3.googlecode.com/svn/trunk/overlayview/custommarker.html

2. Run this JavaScript (eg in Firebug console):
google.maps.event.addListener(map, 'click', function(event) {alert('map');
});
google.maps.event.addListener(overlay, 'click', function(event) {
alert('overlay'); });
3. Click on custom marker

What is the expected output?
The overlay (custom marker) getting the click event first, so it is able to
stop it from bubbling.

What do you see instead?
Map gets click event first. It's impossible to work out if marker has been
clicked at this point.

What version of the product are you using? On what operating system?
Google Maps JavaScript API v3: Custom Marker Demo
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.2.5pre)
Gecko/20100429 Namoroka/3.6.5pre

Please provide any additional information below.

Original issue reported on code.google.com by dave1010 on 30 Apr 2010 at 12:22

GoogleCodeExporter commented 9 years ago
Steps 1 and 2 (above) combined: http://jsfiddle.net/WYQEE/

Original comment by dave1010 on 30 Apr 2010 at 12:27