saikota / google-maps-utility-library-v3

Automatically exported from code.google.com/p/google-maps-utility-library-v3
Apache License 2.0
0 stars 0 forks source link

RichMarker click not passing event around #280

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Around lines 730 of the generated file, RichMarker.prototype.onAdd method 
contains:

google.maps.event.addDomListener(this.markerContent_, 'click', function(e) {
      google.maps.event.trigger(that, 'click');
});

The trigger() should pass as third parameter the argument received which is the 
MouseEvent.

Actual result:
Not being passed, so it's not cancelable for bubbling events (such as having a 
RichMarker click listener prevent the map click listener at the same time)

Version: r457 (Jun 13, 2013)

Browser / Operating System: All

Additional comments:
The documentation shows it correctly, as it should be passed around.

*********************************************************
Tip: Star this issue (next to title) to receive notifications of status
changes against this issue, also used as a gauge for how many people are
interested in seeing it resolved.
*********************************************************

Original issue reported on code.google.com by tomasl...@gmail.com on 19 Nov 2013 at 10:09

GoogleCodeExporter commented 9 years ago
BTW, I've joined the mailing list but seems as dead. 

Original comment by tomasl...@gmail.com on 19 Nov 2013 at 10:10

GoogleCodeExporter commented 9 years ago
Thanks for the report, I'll investigate.

Original comment by brett.mc...@gmail.com on 21 Nov 2013 at 7:58

GoogleCodeExporter commented 9 years ago
Can you post a code sample to verify that your suggested solution will resolve 
the issue?

Original comment by brett.mc...@gmail.com on 26 Nov 2013 at 6:19

GoogleCodeExporter commented 9 years ago

I confirm lines 731-733 should be changed to:

    google.maps.event.addDomListener(this.markerContent_, 'click', function(e) {     
      google.maps.event.trigger(that, 'click', e);
    });

so that clicks on RichMarker can be stopped from being passed on like here:

    google.maps.event.addListener(richmarker1, 'click', function(e) {        
        infowindow.setContent('RichMarker clicked');
        infowindow.open(map, this);
        e.stopPropagation();
    });

Original comment by thismar...@gmail.com on 7 Aug 2014 at 12:21

GoogleCodeExporter commented 9 years ago
Hi. Can I have some clues on what schould I put to replace 
"this.markerContent_"? a css class or id?

Original comment by s...@esokia-webagency.com on 19 May 2015 at 5:30