Skip to content

Commit

Permalink
filter_liveSearch now works properly in non-webkit browsers; fixes #285
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Apr 26, 2013
1 parent 68cc42c commit d54813d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/jquery.tablesorter.widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -583,16 +583,17 @@ ts.addWidget({
})
.find('input.' + css).bind('keyup search', function(e, filter){
// ignore arrow and meta keys; allow backspace
if (e.type === 'keyup' && ((e.which < 32 && e.which !== 8) || (e.which >= 37 && e.which <=40) || (e.which !== 13 && !wo.filter_liveSearch))) { return; }
if (e.type === 'keyup' && ((e.which < 32 && e.which !== 8 && wo.filter_liveSearch && e.which !== 13) || (e.which >= 37 && e.which <=40) || (e.which !== 13 && !wo.filter_liveSearch))) { return; }
// skip delay
if (typeof filter !== 'undefined' || filter === false){
checkFilters();
// no return false; allow search event propogation up to table
} else {
// delay filtering
clearTimeout(timer);
timer = setTimeout(function(){
checkFilters(filter);
}, wo.filter_searchDelay);
}, wo.filter_liveSearch ? wo.filter_searchDelay : 10);
return false;
}
});
Expand Down

0 comments on commit d54813d

Please sign in to comment.