From bbf20f895530f4f7283048c4ff68c47d8238e84d Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Thu, 11 Jun 2020 13:33:18 +0200 Subject: [PATCH] Scrollable widget: Fix error in variable declaration (#4704) --- core/modules/widgets/scrollable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/widgets/scrollable.js b/core/modules/widgets/scrollable.js index ca63db52d..01a04a7eb 100644 --- a/core/modules/widgets/scrollable.js +++ b/core/modules/widgets/scrollable.js @@ -66,10 +66,10 @@ ScrollableWidget.prototype.handleScrollEvent = function(event) { Scroll an element into view */ ScrollableWidget.prototype.scrollIntoView = function(element) { - var duration = $tw.utils.getAnimationDuration(); + var duration = $tw.utils.getAnimationDuration(), + srcWindow = element ? element.ownerDocument.defaultView : window; this.cancelScroll(); this.startTime = Date.now(), - srcWindow = element ? element.ownerDocument.defaultView : window; var scrollPosition = { x: this.outerDomNode.scrollLeft, y: this.outerDomNode.scrollTop