diff options
Diffstat (limited to 'static/saclay/js/search.js')
-rwxr-xr-x | static/saclay/js/search.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/static/saclay/js/search.js b/static/saclay/js/search.js index 27e9a3a..a680656 100755 --- a/static/saclay/js/search.js +++ b/static/saclay/js/search.js @@ -37,7 +37,8 @@ function welcome_search(){ // disable enter $(window).keydown(function(event){ - if (event.keyCode == 13) { + if ($("#haystack-search").filter(":visible").length && event.keyCode == 13 + && $("#id_q").val() != "") { event.preventDefault(); if (!welcome_search()){ $("#haystack-search").click(); |