From a81442f44f394344c5afdf5e638e0abe6e35acc8 Mon Sep 17 00:00:00 2001 From: Til Date: Sat, 9 May 2026 20:30:04 +0200 Subject: [PATCH] don't scroll when closing a modal --- copyparty/web/browser.html | 8 ++++---- copyparty/web/browser.js | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/copyparty/web/browser.html b/copyparty/web/browser.html index 1e648723..d0203cf8 100644 --- a/copyparty/web/browser.html +++ b/copyparty/web/browser.html @@ -151,7 +151,7 @@
{{ "" if sb_lg else logues[0] }}
diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index af853769..caa5a450 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -1149,6 +1149,13 @@ ebi('h_up2k').onclick = function(){ 0; } +ebi('cl_up').onclick = +ebi('up_outside').onclick = + function () { + hist_push('#') + modaltoggle('up2k', false); + } + ebi('sum_u2conf').onclick = function(){ clmod(this.parentElement, 'open', 't'); } @@ -1399,6 +1406,13 @@ ebi('op_cfg').innerHTML = ( ebi('s_content').scrollTop = 0; } + + ebi('cl_cfg').onclick = + ebi('s_outside').onclick = + function () { + hist_push('#') + modaltoggle('cfg'); + } })(); // accent color