Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 527e753db237264351287456e71160c1088e8729 1 parent f55c257
jqueryninja authored
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'){
Please sign in to comment.
Something went wrong with that request. Please try again.