Skip to content

Commit 0240932

Browse files
committed
Fix exception in $.scrollParent
1 parent 0330f89 commit 0240932

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

assets/javascripts/lib/util.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ $.offset = (el, container = document.body) ->
158158
left: left
159159

160160
$.scrollParent = (el) ->
161-
while el.nodeType is 1 and el = el.parentNode
161+
while (el = el.parentNode) and el.nodeType is 1
162162
break if el.scrollTop > 0
163163
break if getComputedStyle(el)?.overflowY in ['auto', 'scroll']
164164
el

0 commit comments

Comments
 (0)