Skip to content
Browse files

Fixes problem in IE where offsetParent was null, putting after null c…

…heck. Also avoids an unnecessary variable assignment if we are returning out of the function.
  • Loading branch information...
1 parent f55c257 commit 527e753db237264351287456e71160c1088e8729 jqueryninja committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 Source/Element/Element.Position.js
View
3 Source/Element/Element.Position.js
@@ -69,9 +69,10 @@ var local = Element.Position = {
offsetParent = element.measure(function(){
return document.id(this.getOffsetParent());
}),
- parentScroll = offsetParent.getScroll();
+ parentScroll;
if (!offsetParent || offsetParent == element.getDocument().body) return;
+ parentScroll = offsetParent.getScroll();
parentOffset = offsetParent.measure(function(){
var position = this.getPosition();
if (this.getStyle('position') == 'fixed'){

0 comments on commit 527e753

Please sign in to comment.
Something went wrong with that request. Please try again.