Explorar o código

Fix exception in $.scrollParent

Thibaut Courouble %!s(int64=8) %!d(string=hai) anos
pai
achega
0240932198
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      assets/javascripts/lib/util.coffee

+ 1 - 1
assets/javascripts/lib/util.coffee

@@ -158,7 +158,7 @@ $.offset = (el, container = document.body) ->
   left: left
 
 $.scrollParent = (el) ->
-  while el.nodeType is 1 and el = el.parentNode
+  while (el = el.parentNode) and el.nodeType is 1
     break if el.scrollTop > 0
     break if getComputedStyle(el)?.overflowY in ['auto', 'scroll']
   el