Script error in setOffsetOption() if !offsetParent #1184

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@RiZKiT
RiZKiT commented Mar 5, 2013

offsetParent.getScroll() had thrown an error if !offsetParent. Because there is already an if condition with return, its moved after that condition.

@RiZKiT RiZKiT Script error in setOffsetOption() if !offsetParent
offsetParent.getScroll() had thrown an error for !offsetParent. Because there is already an if condition with return, its moved after that condition.
83da83e
@RiZKiT
RiZKiT commented Mar 5, 2013

Oh i see its a duplicate of #1122 but it isn't related to IE only. It happens at least when element is "position: fixed".

@SergioCrisostomo
Member

👍

@anutron anutron commented on the diff Apr 24, 2014
Source/Element/Element.Position.js
offsetParent = element.measure(function(){
return document.id(this.getOffsetParent());
- }),
- parentScroll = offsetParent.getScroll();
+ });
@anutron
anutron Apr 24, 2014 MooTools member

can we use spaces here for indentation so it lines up with the line above? /nitpick

But otherwise I like the solution.

@RiZKiT
RiZKiT Apr 24, 2014

With tabsize = 4 it looks right, I don't know how to fix this.

@anutron
anutron Apr 24, 2014 MooTools member

Don't use tabs here. Use tabs up to the var indentation and then use spaces from there in. Not a huge deal. If you can't figure it out or don't have time, it's ok.

@anutron
Member
anutron commented Apr 24, 2014

🚀

@anutron
Member
anutron commented Apr 24, 2014

I just shipped it. 08f564d

@anutron anutron closed this Apr 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment