Skip to content

Commit

Permalink
Fix - Edge: Clear in search input wasn't working
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanJard committed Apr 11, 2020
1 parent 10bc699 commit 8578050
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions js/core/core.filter.js
Expand Up @@ -60,6 +60,14 @@ function _fnFeatureHtmlFilter ( settings )
_fnThrottle( searchFn, searchDelay ) :
searchFn
)
.on( 'mouseup', function(e) {
// Edge fix! Edge 17 does not trigger anything other than mouse events when clicking
// on the clear icon (Edge bug 17584515). This is safe in other browsers as `searchFn`
// checks the value to see if it has changed. In other browsers it won't have.
setTimeout( function () {
searchFn.call(jqFilter[0]);
}, 10);
} )
.on( 'keypress.DT', function(e) {
/* Prevent form submission */
if ( e.keyCode == 13 ) {
Expand Down

0 comments on commit 8578050

Please sign in to comment.