[OpenLayers-Trac] [OpenLayers] #1550: IE7 resize event problem

OpenLayers trac at openlayers.org
Sun May 18 08:08:57 EDT 2008


#1550: IE7 resize event problem
-----------------------+----------------------------------------------------
 Reporter:  ksgeograf  |       Owner:     
     Type:  feature    |      Status:  new
 Priority:  minor      |   Milestone:     
Component:  general    |     Version:  2.6
 Keywords:             |       State:     
-----------------------+----------------------------------------------------
 In IE7, if you try to read the size of an element, it will immediately
 fire the "resize" event. If the code reading the size is activated by the
 event, it returns width/height = 0 for all known properties (ie,
 clientWidth, scrollWidth, etc.).

 This causes problems in IE7, because updateSize() in Map.js calls
 getCurrentSize().

 updateSize is the event handler for the resize event, and getCurrentSize
 tries to read the size of the element. In my solution, this causes the
 page to momentarily stop working, because the map is resized to 0 width,
 and 0 height. Usually the onload event of the layer restores
 functionality, but ocasionally not.

 I have summed up my changes in a patch for the trunk version of Map.js. It
 may not be completely correct, because I developed the change for 2.5, and
 have not yet upgraded.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/1550>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list