From 0240932198e95ad4b00cebcf4db4f7b9febee8f7 Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Sun, 17 Sep 2017 09:29:19 -0400 Subject: [PATCH] Fix exception in $.scrollParent --- assets/javascripts/lib/util.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/lib/util.coffee b/assets/javascripts/lib/util.coffee index f91af12c..59e2a1a1 100644 --- a/assets/javascripts/lib/util.coffee +++ b/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