diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index e88ce435e2..8e326a3b30 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -1542,7 +1542,8 @@ OpenLayers.Util.getRenderedDimensions = function(contentHTML, size, options) { } parent = parent.parentNode; } - if(parentHasPositionAbsolute){ + if(parentHasPositionAbsolute && (containerElement.clientHeight === 0 || + containerElement.clientWidth === 0) ){ superContainer = document.createElement("div"); superContainer.style.visibility = "hidden"; superContainer.style.position = "absolute";