diff --git a/js/widgets/widget-filter.js b/js/widgets/widget-filter.js index fe1aec4c..7508f57b 100644 --- a/js/widgets/widget-filter.js +++ b/js/widgets/widget-filter.js @@ -816,9 +816,6 @@ if ( event.which === tskeyCodes.escape ) { // make sure to restore the last value on escape this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column]; - // live search - } else if ( liveSearch === false ) { - return; // don't return if the search value is empty ( all rows need to be revealed ) } else if ( this.value !== '' && ( // liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace @@ -827,6 +824,11 @@ ( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace && ( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) { return; + // live search + } else if ( liveSearch === false ) { + if ( this.value !== '' && event.which !== tskeyCodes.enter ) { + return; + } } // change event = no delay; last true flag tells getFilters to skip newest timed input tsf.searching( table, true, true, column );