From a143c01a9a743f1eae7b8a14f50338b3d5176d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D1=82=D0=B0=D0=BB=D0=B8=D0=B9=20=D0=9B=D0=B8?= =?UTF-8?q?=D1=82=D0=B2=D0=B8=D0=BD=D0=BE=D0=B2?= Date: Sat, 25 Apr 2026 15:24:34 +0300 Subject: [PATCH] v2.5.0: keep admin scroll clear --- admin-web/static/app.js | 3 +++ admin-web/static/index.html | 2 +- admin-web/static/styles.css | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/admin-web/static/app.js b/admin-web/static/app.js index 690aa3e..39f07d7 100644 --- a/admin-web/static/app.js +++ b/admin-web/static/app.js @@ -605,6 +605,9 @@ function setPage(page, push = true) { if (push && location.hash !== `#${next}`) { history.replaceState(null, "", `#${next}`); } + requestAnimationFrame(() => { + window.scrollTo({ top: 0, behavior: push ? "smooth" : "auto" }); + }); if (next === "traffic") { refreshStats().catch((err) => toast(err.message)); } else if (next === "keys") { diff --git a/admin-web/static/index.html b/admin-web/static/index.html index bd8fc8d..e187059 100644 --- a/admin-web/static/index.html +++ b/admin-web/static/index.html @@ -400,6 +400,6 @@ - + diff --git a/admin-web/static/styles.css b/admin-web/static/styles.css index d734b4c..1587edf 100644 --- a/admin-web/static/styles.css +++ b/admin-web/static/styles.css @@ -935,6 +935,7 @@ td small { .user-traffic-panel { margin-top: 18px; + scroll-margin-top: 112px; } .status-control {