[OpenLayers-Users] Strange IE7 thingy

huub fleuren huub.fleuren at geodan.nl
Fri Sep 7 05:00:50 EDT 2007


Hi
    list

In IE7 is see the strangest thing:

in Events.js  it reads

    isLeftClick : function(event) {
        return (((event.which) && (event.which == 1)) ||
                ((event.button) && (event.button == 1)));
               
    },

in my app it's

if(OpenLayers.Events.isLeftClick(e)) {// do}

In IE this doesn't go, in FF it does go

I checked the values: in isLeftClick
        alert (((event.which) && (event.which == 1)) ||
                ((event.button) && (event.button == 1)));
displays true (if leftclicked...)

In IE7 alert(OpenLayers.Events.isLeftClick(e))  displays 0 (always: e.g. 
if i check with event.button == 2) )

I changed to the following greasy construction

    isLeftClick : function(event) {
        if (((event.which) && (event.which == 1)) ||
                ((event.button) && (event.button == 1)));
           return true
         return false              
    },

this works also  in IE7

Now isn't that the strangest thing?

Regards,
Huub

-- 
=====================================
Geodan IT b.v.
Buitenhaven 27-A
5211 TP 's-Hertogenbosch (NL)
-------------------------------------
Tel: +31 (0)73 - 692 5151
Fax:  +31 (0)73 - 692 5150
Mobiel:
-------------------------------------
Postadres / mailing address
President Kennedylaan 1
1079 MB Amsterdam (NL)
-------------------------------------
E-mail: huub.fleuren at geodan.nl
Website: www.geodan.nl
Disclaimer: www.geodan.nl/disclaimer
-------------------------------------






More information about the Users mailing list