From 0abcb34829985c4489078b76a53d7eaa55e166f3 Mon Sep 17 00:00:00 2001 From: SBD Date: Thu, 1 Feb 2024 14:58:26 +0300 Subject: [PATCH] 7 --- static/js/global_js.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/global_js.js b/static/js/global_js.js index 8435ca7..0215713 100644 --- a/static/js/global_js.js +++ b/static/js/global_js.js @@ -53,8 +53,13 @@ function goToChatIfChat () { let top = scroll_el.offsetTop window.scrollTo({top:top}) } + document.addEventListener('focusout', function(e,scroll_el) { + window.scrollTo(scroll_el, 0) + }); } + + function middleWareJS(){ let footer = document.querySelector("footer") let body = document.querySelector("body")