FIX: Datatables Column Search/Filter - Double click required to open hyperlinks

When the Datatables column filtering is used and you have a hyperlink or button in the table, you end up having to click twice. Once to remove focus from the filter field and second to actually execute the link/button.
JavaScript • JQuery

Add the blur followed by the focus to your filtering logic

$("#example thead th input[type=text]").on( 'keyup change', function () {
      //...filtering
     $(this).blur();
     $(this).focus();
});

Written by Davide76

Posted by fbrefere001 on Sunday January 26, 2025