From c2532c69a96dcd719e735d2a1bb33e88109f32bb Mon Sep 17 00:00:00 2001 From: larsbonczek <44197504+larsbonczek@users.noreply.github.com> Date: Thu, 21 Mar 2019 23:42:42 +0100 Subject: [PATCH] No search on enter if filters are unchanged #1631 Fixing #1631 by not treating the enter key as a key press and thus not executing the search if enter is pressed while no filters were changed. --- js/jquery.tablesorter.widgets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.tablesorter.widgets.js b/js/jquery.tablesorter.widgets.js index 5955f8c9..1f75aacf 100644 --- a/js/jquery.tablesorter.widgets.js +++ b/js/jquery.tablesorter.widgets.js @@ -1288,7 +1288,7 @@ event.preventDefault(); // init search with no delay $( this ).attr( 'data-lastSearchTime', new Date().getTime() ); - tsf.searching( table, eventType !== 'keypress', true, column ); + tsf.searching( table, eventType !== 'keypress' || event.which === tskeyCodes.enter, true, column ); } }); },