Changeset 4783
- Timestamp:
- 10/03/07 12:15:43 (11 months ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Util.js (modified) (1 diff)
- trunk/openlayers/tests/test_Util.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Util.js
r4302 r4783 992 992 993 993 if(element == document.body) { 994 if(OpenLayers.Element.getStyle(child, 'position') == 'absolute') { 994 // FIXME: IE, when passed 'window' as the forElement, treats it as 995 // equal to document.body, but window.style fails, so getStyle 996 // fails, so we are paranoid and check this here. This check should 997 // probably move into element.getStyle in 2.6. 998 if(child && child.style && 999 OpenLayers.Element.getStyle(child, 'position') == 'absolute') { 995 1000 break; 996 1001 } trunk/openlayers/tests/test_Util.html
r4302 r4783 19 19 OpenLayers.Util.removeItem(array, 3); 20 20 t.eq( array.toString(), "1,2,4,5", "Util.removeItem works"); 21 } 22 23 function test_03_Util_pagePosition(t) { 24 t.plan( 1 ); 25 var pp = OpenLayers.Util.pagePosition(window); 26 t.eq( pp.toString(), "0,0", "Page position doesn't bail if passed 'window'") 27 21 28 } 22 29
