OpenLayers OpenLayers

Changeset 1700

Show
Ignore:
Timestamp:
10/16/06 09:51:48 (2 years ago)
Author:
crschmidt
Message:

Zac Barton reports that IEs4Lin does not like document.body.filters. (Confirmed
via forums for the product.) Although this is a bug in that browser, this work
around will allow OL to work for that browser, according to testing.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Util.js

    r1695 r1700  
    232232    var arVersion = navigator.appVersion.split("MSIE"); 
    233233    var version = parseFloat(arVersion[1]); 
    234      
    235     return ( (document.body.filters) && 
     234    var filter = false; 
     235     
     236    // IEs4Lin dies when trying to access document.body.filters, because  
     237    // the property is there, but requires a DLL that can't be provided. This 
     238    // means that we need to wrap this in a try/catch so that this can 
     239    // continue. 
     240     
     241    try {  
     242        filter = document.body.filters; 
     243    } catch (e) { 
     244    }     
     245     
     246    return ( filter && 
    236247                      (version >= 5.5) && (version < 7) ); 
    237248}