set IS_GECKO to true only for real gecko browsers, not for webkit ones. r=bartvde (closes #2942)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10909 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2010-11-23 09:19:25 +00:00
parent e851d453de
commit 30eabe26ad

View File

@@ -1636,7 +1636,8 @@ OpenLayers.Util.removeTail = function(url) {
* {Boolean} True if the userAgent reports the browser to use the Gecko engine
*/
OpenLayers.IS_GECKO = (function() {
return navigator.userAgent.toLowerCase().indexOf("gecko") != -1;
var ua = navigator.userAgent.toLowerCase();
return ua.indexOf("webkit") == -1 && ua.indexOf("gecko") != -1;
})();
/**