History

Fix exception in $.scrollParent

Thibaut Courouble committed 9 years ago

Commit 02409321 parent 0330f891 file · +1 −1Browse files

Showing the changes to assets/javascripts (1 of 1 file). Show all

Unified · Split

assets/javascripts/lib/util.coffee+1−1
@@ -158,7 +158,7 @@ $.offset = (el, container = document.body) -> · 157 unmodified lines
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