From: Tim Düsterhus Date: Wed, 3 Jun 2020 16:21:10 +0000 (+0200) Subject: Reset scrollTop to 0 before expanding in WoltLabSuite/Core/Bbcode/Collapsible X-Git-Tag: 5.3.0_Alpha_1~224^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b1c776313876629a95136f6b87fd002b42d19ca5;p=GitHub%2FWoltLab%2FWCF.git Reset scrollTop to 0 before expanding in WoltLabSuite/Core/Bbcode/Collapsible --- 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(); }