Merge pull request #1187 from ae-utbm/fix-search

Remove `s` shortcut for search bar
This commit is contained in:
Bartuccio Antoine
2025-09-24 18:09:00 +02:00
committed by GitHub

View File

@@ -101,16 +101,6 @@
{% endblock %} {% endblock %}
{% block script %} {% block script %}
<script>
document.addEventListener("keydown", (e) => {
// Looking at the `s` key when not typing in a form
if (e.keyCode !== 83 || ["INPUT", "TEXTAREA", "SELECT"].includes(e.target.nodeName)) {
return;
}
document.getElementById("search").focus();
e.preventDefault(); // Don't type the character in the focused search input
})
</script>
{% endblock %} {% endblock %}
</body> </body>
</html> </html>