From c53d760350d5fef043fa3eb41a97e68414806959 Mon Sep 17 00:00:00 2001 From: fatchan Date: Sun, 22 Dec 2019 22:16:23 +1100 Subject: [PATCH] scroll on expanding actionfooter for js use --- gulp/res/js/expand.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gulp/res/js/expand.js b/gulp/res/js/expand.js index b87f54e6..89d462c3 100644 --- a/gulp/res/js/expand.js +++ b/gulp/res/js/expand.js @@ -3,6 +3,13 @@ setDefaultLocalStorage('volume', 100); window.addEventListener('DOMContentLoaded', (event) => { + const actionFooter = document.querySelector('summary.toggle-summary'); + if (actionFooter) { + actionFooter.onclick = () => { + actionFooter.scrollIntoView(); + } + } + const isCatalog = window.location.pathname.endsWith('catalog.html'); if (!isCatalog) {