Skip to content
Snippets Groups Projects
Commit 3be32e1a authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Improved autofocus with pre-existent text.

parent 0071b848
No related branches found
No related tags found
No related merge requests found
...@@ -81,7 +81,17 @@ ...@@ -81,7 +81,17 @@
{% include "footer.html" %} {% include "footer.html" %}
<script>
$(document).ready(function() {
var search_text_input = $("#search_text");
var len = search_text_input.val().length;
search_text_input[0].focus();
search_text_input[0].setSelectionRange(len, len);
});
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment