From 9406f341b18f6ad98065656b37a56fcaeb2fbf2a Mon Sep 17 00:00:00 2001 From: Thegennok Date: Fri, 12 Feb 2016 15:54:22 +0100 Subject: [PATCH] Clear main search bar when user click on the clear button #574 + typo fix --- web/js/main_search.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/js/main_search.js b/web/js/main_search.js index d7ca0ead..5aafd479 100644 --- a/web/js/main_search.js +++ b/web/js/main_search.js @@ -58,7 +58,7 @@ $(document).ready(function() { var option_label = $('#search_type option[value="' + this.value + '"]').text(); $('#searchcontextvalue').text(option_label); check_default(this.id); - // Check if suggestions shoul be disabled or enabled + // Check if suggestions should be disabled or enabled check_suggestions(); }); @@ -148,6 +148,7 @@ $(document).ready(function() { // Clear the search field when clicking on the X button $('#clear_search').on('click', function() { $('#recherche').val('').focus(); + $('#recherche').autocomplete().clear(); $(this).hide(); }); });