From 6653993563b7355504fa1104552371054b719be4 Mon Sep 17 00:00:00 2001 From: Brian White Date: Fri, 22 Nov 2024 17:17:22 -0500 Subject: [PATCH] Fix: prevent interference with Select extension --- js/dataTables.responsive.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/dataTables.responsive.js b/js/dataTables.responsive.js index 11269a9..c85c82f 100644 --- a/js/dataTables.responsive.js +++ b/js/dataTables.responsive.js @@ -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')) {