diff --git a/htdocs/mapscript.js b/htdocs/mapscript.js index ff1d22e..57fa0f8 100644 --- a/htdocs/mapscript.js +++ b/htdocs/mapscript.js @@ -292,7 +292,7 @@ function toggle_search() { search_element.style.overflow = "scroll"; search_element.style.padding = "6px"; search_element.style.height = "100%"; - search_element.innerHTML = '
' ; + search_element.innerHTML = '
' ; } td = document.getElementById('windowtr').insertCell(0); @@ -302,7 +302,7 @@ function toggle_search() { td.id = "searchbar"; td.appendChild(search_element); - document.getElementById('search_query').focus(); + document.getElementById('search_query').select(); } function htmlEntities(str) { @@ -321,7 +321,9 @@ var default_street_color = "#3388ff"; function search(e) { var query = document.getElementById("search_query").value; document.getElementById('search_results').innerHTML = ""; - if (query.length > 0 || e.key == "Enter") { + if (true) { + if (query.length == 0) + query = "!@#$%^&"; // Cheap workaround to (hopefully) match nothing results = document.createElement("ul"); for (var i = 0; i < layers._layers.length; i++) { if (!layers._layers[i].layer._layers)