Custom selector for click blur

Custom selector for click blur

sliekenssliekens Posts: 97Questions: 17Answers: 2
edited February 2017 in KeyTable

I love the blurable feature but I miss the ability to specify elements that should not cause key-blur. Right now, the rules are as follows:
* Click on the search input will blur focus
* If the click was inside the DataTables container, don't blur
* Don't blur in Editor form
* Or an Editor date input
* If the click was inside the fixed columns container, don't blur

I would like there to be an option to configure a jQuery selector for elements that, when clicked, should not cause key-blur.

$('#example').DataTable({
  keys: {
    columns: ':not(:first-child)',
    blurable: true,
    blurableIgnore: '.no-keyblur'
  }
});

I need this feature for custom controls outside the table wrapper that interact with the selected cell.

I already added this feature to my fork: https://github.com/StevenLiekens/KeyTable/commit/c6ecbb3195cb08a02fd233be4abea10894bebf66

Replies

  • allanallan Posts: 61,622Questions: 1Answers: 10,090 Site admin

    Thanks for the suggestion - I do rather like this!

    Allan

This discussion has been closed.