History

Fix exception in $.scrollParent

Thibaut Courouble committed 10 years ago

Commit 55de4221 parent 8340ccf1 file · +1 −1Browse files

Unified · Split

assets/javascripts/lib/util.coffee+1−1
@@ -157,7 +157,7 @@ $.offset = (el, container = document.body) -> · 156 unmodified lines
157$.scrollParent = (el) ->157$.scrollParent = (el) ->
158 while el = el.parentElement158 while el = el.parentElement
159 break if el.scrollTop > 0159 break if el.scrollTop > 0
160 break if getComputedStyle(el).overflowY in ['auto', 'scroll']160 break if getComputedStyle(el)?.overflowY in ['auto', 'scroll']
161 el161 el
162 162
163$.scrollTo = (el, parent, position = 'center', options = {}) ->163$.scrollTo = (el, parent, position = 'center', options = {}) ->