summaryrefslogtreecommitdiff
path: root/cgithub/views
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-08-13 02:40:57 -0400
committerJoe Mou <dev@mou.fo>2026-08-13 02:42:41 -0400
commit16dfeb61f79e6cd44c667422b8dc50f226269d80 (patch)
tree0a293e93ad90a2ebe2a1c40a5dfd145a00da0daa /cgithub/views
parente8461b57674b9c4e6ed93151d06dbc6149703178 (diff)
Scroll on / search shortcut
Diffstat (limited to 'cgithub/views')
-rw-r--r--cgithub/views/layout.eta4
1 files changed, 3 insertions, 1 deletions
diff --git a/cgithub/views/layout.eta b/cgithub/views/layout.eta
index ca6fff2..6d1b052 100644
--- a/cgithub/views/layout.eta
+++ b/cgithub/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>