diff --git a/lib/OpenLayers/Popup/Framed.js b/lib/OpenLayers/Popup/Framed.js index d04a781b38..df0891f3b7 100644 --- a/lib/OpenLayers/Popup/Framed.js +++ b/lib/OpenLayers/Popup/Framed.js @@ -321,8 +321,8 @@ OpenLayers.Popup.Framed = var h = (isNaN(positionBlock.size.h)) ? this.size.h - (b + t) : positionBlock.size.h; - block.div.style.width = w + 'px'; - block.div.style.height = h + 'px'; + block.div.style.width = (w < 0 ? 0 : w) + 'px'; + block.div.style.height = (h < 0 ? 0 : h) + 'px'; block.div.style.left = (l != null) ? l + 'px' : ''; block.div.style.bottom = (b != null) ? b + 'px' : '';