asroboy / 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

markerCluster speed test example fails in IE7/8 #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Demo link or sample code:
http://google-maps-utility-library-
v3.googlecode.com/svn/tags/markerclusterer/1.0/examples/speed_test_example.
html

What steps will reproduce the problem?
1.open in IE7
2.click on a marker
3.error occers on this line 98 of speed_test.js

98  e.preventDefault();

Expected result:
infowindow should open

Actual result:
infowindow does not open.

Version: ###

Browser / Operating System:
IE7/8 Vista and XP

Additional comments:
my javascript knowledge isn't that good, so i don't know where to go from 
here, but i hope this helps someone.

Alex

Original issue reported on code.google.com by eck...@gmail.com on 9 Apr 2010 at 7:26

GoogleCodeExporter commented 8 years ago
Hey guys I've looked into it a bit further.  .preventDefault isn't supported by
internet explorer. this can be sovled by replacing line 98 with

        if(!e) var e = window.event;

    //e.cancelBubble is supported by IE - this will kill the bubbling process.
    e.cancelBubble = true;
    e.returnValue = false;

    //e.stopPropagation works only in Firefox.
    if (e.stopPropagation) {
        e.stopPropagation();
        e.preventDefault();
    }

see http://www.openjs.com/articles/prevent_default_action/ for more info.

Original comment by eck...@gmail.com on 23 Apr 2010 at 6:33

GoogleCodeExporter commented 8 years ago

Original comment by lu...@google.com on 31 Aug 2010 at 1:45