Commit 4ea879ef authored by Alexandre Bailly's avatar Alexandre Bailly

Fix pour l'autofocus sur le textInput pour la recherche.

parent 3b9e4267
Pipeline #8336 passed with stage
in 26 seconds
......@@ -19,7 +19,6 @@ function setup() {
// set search box toggle RegEx event
//document.getElementById("searchbox").addEventListener("keydown", toggleRegEx);
document.getElementById("searchbox").addEventListener("keydown", timerSearchBox);
// set search box search event
//document.getElementById("searchbox").addEventListener("keyup", search);
......@@ -59,7 +58,14 @@ function setup() {
// set history state
history.replaceState("list", document.title);
//fix for text input focus
document.getElementById("searchbox").focus();
let val = document.getElementById("searchbox").value; //store the value of the element
document.getElementById("searchbox").value = ''; //clear the value of the element
document.getElementById("searchbox").value = val; //set that value back.
}
/*
function toggleRegEx(event) {
if (event.keyCode == 9) {
......
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