mirror of
https://github.com/ae-utbm/sith.git
synced 2025-10-09 08:14:39 +00:00
Merge pull request #1187 from ae-utbm/fix-search
Remove `s` shortcut for search bar
This commit is contained in:
@@ -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>
|
||||||
|
Reference in New Issue
Block a user