diff options
| author | Joe Mou <dev@mou.fo> | 2026-08-13 02:40:57 -0400 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-08-13 02:42:41 -0400 |
| commit | 7c928d30b16b37624841c4615c0d4bda426e4159 (patch) | |
| tree | f21498c508bc227caf6443181c9cae9fc144752b /views/layout.eta | |
| parent | ca23e43e0e95014ddd5f8d5e02e1118f5e2978f5 (diff) | |
Scroll on / search shortcut
Diffstat (limited to 'views/layout.eta')
| -rw-r--r-- | views/layout.eta | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/views/layout.eta b/views/layout.eta index ca6fff2..6d1b052 100644 --- a/views/layout.eta +++ b/views/layout.eta @@ -55,7 +55,9 @@ git clone git@github.com:<%= it.repo.owner %>/<%= it.repo.name %>.git</code></pr if (shortcut === "/") { e.preventDefault(); - document.getElementById('search-input').select(); + const input = document.getElementById('search-input'); + input.select(); + input.scrollIntoView({ block: "nearest" }); } }); </script> |
