[OpenLayers-Trac] [OpenLayers] #2991: Incorrect getRenderedDimensions() result in Firefox

OpenLayers trac-20090302 at openlayers.org
Fri Dec 31 10:31:47 EST 2010


#2991: Incorrect getRenderedDimensions() result in Firefox
----------------------------------------------------------------+-----------
 Reporter:  ahtih                                               |       Owner:              
     Type:  bug                                                 |      Status:  new         
 Priority:  minor                                               |   Milestone:  2.11 Release
Component:  Util                                                |     Version:  2.10        
 Keywords:  getRenderedDimensions, Firefox, popup, FramedCloud  |       State:              
----------------------------------------------------------------+-----------
 getRenderedDimensions() returns too small width on Firefox, causing both
 scrollbars to appear in popups if in fact only a vertical scrollbar is
 needed.

 Test page attached. The correct returned width in this test should be
 200px (successful in Opera 11.00 and Chrome 7.0.517.44), but Firefox
 3.6.13 returns 185px. This is strange since we have lots of horizontal
 space available, and we need to contain a 200px wide DIV, thus there is no
 apparent reason to return anything less than 200px. OpenLayers 2.6 passes
 this test.

 The bug only appears if all of the following is true:[[BR]]

 * ''contentHTML'' includes a fixed-width element (in test page it is a
 200px wide DIV)[[BR]]

 * ''contentHTML'' does not vertically fit into height specified by
 ''size'' argument[[BR]]

 * ''options.displayClass'' style has "overflow: auto"
 (olFramedCloudPopupContent meets this criterion)[[BR]]


 Either of the following getRenderedDimensions() changes would
 fix/workaround this:[[BR]]

 * set content.style.overflow="hidden"[[BR]]

 * remove container.style.position="absolute"[[BR]]

 However, they probably break #1906. I don't really know how to solve this.
 Also attaching a HTML page showing the Firefox weirdness without
 OpenLayers code.

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


More information about the Trac mailing list