History

Fix exception in $.scrollParent

Thibaut Courouble committed 9 years ago

Commit 5ce239d1 parent 437eb8d1 file · +1 −1Browse files

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 = el.parentNode
161+ while el.nodeType is 1 and el = el.parentNode
162162 break if el.scrollTop > 0
163163 break if getComputedStyle(el)?.overflowY in ['auto', 'scroll']
164164 el

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t