Fixed broken forms due to search shortcuts

This commit is contained in:
squidfunk 2017-07-25 16:08:05 +02:00 committed by Martin Donath
parent 993fb4782c
commit fce9e77c26
4 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -150,7 +150,7 @@
{% endblock %} {% endblock %}
</div> </div>
{% block scripts %} {% block scripts %}
<script src="{{ base_url }}/assets/javascripts/application-c35428f87f.js"></script> <script src="{{ base_url }}/assets/javascripts/application-b4eb7a00cd.js"></script>
{% set languages = lang.t("search.languages").split(",") %} {% set languages = lang.t("search.languages").split(",") %}
{% if languages | length and languages[0] != "" %} {% if languages | length and languages[0] != "" %}
{% set path = base_url + "/assets/javascripts/lunr" %} {% set path = base_url + "/assets/javascripts/lunr" %}

View File

@ -334,8 +334,8 @@ function initialize(config) { // eslint-disable-line func-style
return false return false
} }
/* Search is closed */ /* Search is closed and we're not inside a form */
} else { } else if (document.activeElement && !document.activeElement.form) {
/* F/S: Open search if not in input field */ /* F/S: Open search if not in input field */
if (ev.keyCode === 70 || ev.keyCode === 83) { if (ev.keyCode === 70 || ev.keyCode === 83) {