summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Helenius <klaus.helenius@gmail.com>2021-10-20 19:15:58 +0300
committerGitHub <noreply@github.com>2021-10-20 12:15:58 -0400
commita21d5a001fbbe0764b748d6ae4c83a9a54cbd7b0 (patch)
treefb18062450a1d72e00a1f0c474d72d4c300ed99a
parenta2119c09e95eeb871c2b30046f596d61257b108c (diff)
fileserver: Prevent focusing filter from scrolling on page load (#4393)
-rw-r--r--modules/caddyhttp/fileserver/browsetpl.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/fileserver/browsetpl.go b/modules/caddyhttp/fileserver/browsetpl.go
index 72b0ec6..06ef06d 100644
--- a/modules/caddyhttp/fileserver/browsetpl.go
+++ b/modules/caddyhttp/fileserver/browsetpl.go
@@ -430,7 +430,7 @@ footer {
</footer>
<script>
var filterEl = document.getElementById('filter');
- filterEl.focus();
+ filterEl.focus({ preventScroll: true });
function initFilter() {
if (!filterEl.value) {