Script error in setOffsetOption() if !offsetParent #1184

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

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
Contributor

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".

Member

SergioCrisostomo commented Apr 24, 2014

👍

@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

Owner

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

Contributor

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

@anutron

anutron Apr 24, 2014

Owner

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.

Owner

anutron commented Apr 24, 2014

🚀

Owner

anutron commented Apr 24, 2014

I just shipped it. 08f564d

anutron closed this Apr 24, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment