Verified Commit b4b7817b authored by Sli's avatar Sli

pedagogy: auto send form when typing

parent d85152e5
......@@ -16,7 +16,7 @@
{% endif %}
<input class="input-search" type="text" name="search">
<input id="search_input" class="input-search" type="text" name="search">
<button class="button-search">{% trans %}Search{% endtrans %}</button>
<div class="radio-guide">
......@@ -118,6 +118,20 @@
return html + "</td>";
var lastTypedLetter;
$("#search_input").on("keyup", function(){
// Auto submit when user pauses it's typing
lastTypedLetter = setTimeout(function (){
}, 300);
$("#search_input").on("change", function(e){
// Don't send request when leaving the text area
// It has already been send by the keypress event
// Auto fill from get arguments
var urlParams = new URLSearchParams(;
if (urlParams.has("search"))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment