From b1c776313876629a95136f6b87fd002b42d19ca5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 3 Jun 2020 18:21:10 +0200 Subject: [PATCH] Reset scrollTop to 0 before expanding in WoltLabSuite/Core/Bbcode/Collapsible --- .../install/files/js/WoltLabSuite/Core/Bbcode/Collapsible.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Bbcode/Collapsible.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Bbcode/Collapsible.js index a691f67a7d..20b0d5d595 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Bbcode/Collapsible.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Bbcode/Collapsible.js @@ -76,9 +76,11 @@ define([], function() { // expand boxes that are initially scrolled if (overflowContainer.scrollTop !== 0) { + overflowContainer.scrollTop = 0; toggle(); } overflowContainer.addEventListener('scroll', function () { + overflowContainer.scrollTop = 0; if (container.classList.contains('collapsed')) { toggle(); } -- 2.20.1