From 2608a0ebe7aa5c67bdddc9a2825f0bf2f1af7a57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Fri, 4 May 2012 14:26:42 +0200 Subject: [PATCH] fix resize handling in IE 9 and better (refs #449) --- lib/OpenLayers/Map.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index ba727f5189..f344a0b7f1 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -580,8 +580,8 @@ OpenLayers.Map = OpenLayers.Class({ // Because Mozilla does not support the "resize" event for elements // other than "window", we need to put a hack here. - if (OpenLayers.String.contains(navigator.appName, "Microsoft")) { - // If IE, register the resize on the div + if (parseFloat(navigator.appVersion.split("MSIE")[1]) < 9) { + // If IE < 9, register the resize on the div this.events.register("resize", this, this.updateSize); } else { // Else updateSize on catching the window's resize