Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: prevent interference with Select extension #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions js/dataTables.responsive.js
Original file line number Diff line number Diff line change
Expand Up @@ -782,11 +782,17 @@ $.extend(Responsive.prototype, {
var selector = typeof target === 'string' ? target : 'td, th';

if (target !== undefined || target !== null) {
var dtSelectSelector = (dt.select && dt.select.selector());
// Click handler to show / hide the details rows when they are available
$(dt.table().body()).on(
'click.dtr mousedown.dtr mouseup.dtr',
selector,
function (e) {
// If the Select extension is in use and the user clicked something
// matching Select's selector, ignore the event
if (dtSelectSelector && $(e.target).is(dtSelectSelector))
return;

// If the table is not collapsed (i.e. there is no hidden columns)
// then take no action
if (!$(dt.table().node()).hasClass('collapsed')) {
Expand Down