diff --git a/js/functions.js b/js/functions.js index dfb7a912..f31628c3 100644 --- a/js/functions.js +++ b/js/functions.js @@ -117,9 +117,13 @@ function mkChosen(options) { function accSearch(continous, event) { var lenTxtSearch = $('#txtSearch').val().length; - if ( typeof (event) != 'undefined' && (event.keyCode < 48 || (event.keyCode > 105 && event.keyCode < 123)) ) return; + if ( typeof (event) != 'undefined' + && ((event.keyCode < 48 && event.keyCode != 13) || (event.keyCode > 105 && event.keyCode < 123)) ) return; - if (lenTxtSearch < 3 && continous === 1 && lenTxtSearch > window.lastlen) return; + if (lenTxtSearch < 3 + && continous === 1 + && lenTxtSearch > window.lastlen + && event.keyCode != 13) return; window.lastlen = lenTxtSearch;