Problem/motivation
I’ve encountered an issue when using Responsive Tables Filter with a table built via Views that contains links opening a modal dialog.
When the table is made responsive following the official documentation (adding the responsive class to a specific View), links that previously opened a modal stop working.
This seems to happen only after the table is transformed by Responsive Tables Filter.
Steps to reproduce
- Create a View displaying results as a Table.
- Add a field rendered as a link that opens a modal (e.g. using Drupal dialogs / AJAX modal).
- Verify that the modal opens correctly when clicking the link.
- Apply Responsive Tables Filter only to this View by adding the responsive class as described here: https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib...
- View the page on a screen size where the table becomes responsive.
- Click the same link.
- The link no longer opens the modal.
- No dialog is shown and the expected behavior is lost.
Expected Result
Links inside the responsive table should continue to behave exactly the same, including opening modals, regardless of the responsive transformation.
Additional Notes
- The issue does not occur if Responsive Tables Filter is not applied.
- The issue only appears after the table is converted to its responsive structure.
- It looks like the DOM manipulation performed by the module may interfere with the event handlers required for modal links.
Environment
- Drupal core: 10.6.2
- Responsive Tables Filter version: 2.1.0
Comments
Comment #2
iorgos commentedComment #3
iorgos commentedThe problem does not occur with version 2.0.2
Comment #4
kirksolar commentedAjax items were failing in some elements in my admin pages. Like, media library modal wasn't working and just reloading the page, and also some View Source toggle buttons weren't working in CKEditor.
I was able to fix it in my projects by disabling the module and re-enabling it. I don't know why this would fix it, but it did. Maybe it's not a permanent fix and perhaps it's just rearranging loaded admin resources.
Comment #5
aren33k commentedExperiencing same issue here (Drupal 11.3.2)
@kirksolar It probably works for you because disabling the module disabled 'Automatically add to all table-based Drupal Views and tables generated via theme rendering.'. If you enable that again it will probably fail.
Comment #6
mark_fullmerRaising the priority to critical, as this is disruptive to many things on sites!
Comment #7
mark_fullmerComment #8
mark_fullmerComment #10
mark_fullmerOkay, I've created a new release, 2.1.1, that reverts the changes introduced in #3566189: Remove dependency on jQuery, so that sites can update to the latest version of this module and avoid the problem described here. I'll reopen #3566189: Remove dependency on jQuery so that that work can be revisited, now with additional acceptance criteria to make sure we don't make this mistake again. Thanks, everyone, for reporting and providing information about this!