improving the biceps of getStyle(). Now if you pass it a null object, it will not die. r=cr5 (Closes #1051)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7888 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1066,12 +1066,7 @@ OpenLayers.Util.pagePosition = function(forElement) {
|
||||
while(element) {
|
||||
|
||||
if(element == document.body) {
|
||||
// FIXME: IE, when passed 'window' as the forElement, treats it as
|
||||
// equal to document.body, but window.style fails, so getStyle
|
||||
// fails, so we are paranoid and check this here. This check should
|
||||
// probably move into element.getStyle in 2.6.
|
||||
if(child && child.style &&
|
||||
OpenLayers.Element.getStyle(child, 'position') == 'absolute') {
|
||||
if(OpenLayers.Element.getStyle(child, 'position') == 'absolute') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user