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

  1. Create a View displaying results as a Table.
  2. Add a field rendered as a link that opens a modal (e.g. using Drupal dialogs / AJAX modal).
  3. Verify that the modal opens correctly when clicking the link.
  4. 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...
  5. View the page on a screen size where the table becomes responsive.
  6. Click the same link.
  7. The link no longer opens the modal.
  8. 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
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

iorgos created an issue. See original summary.

iorgos’s picture

Component: User interface » Code
iorgos’s picture

The problem does not occur with version 2.0.2

kirksolar’s picture

Ajax 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.

aren33k’s picture

Experiencing 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.

mark_fullmer’s picture

Priority: Normal » Critical

Raising the priority to critical, as this is disruptive to many things on sites!

mark_fullmer’s picture

Title: Modal links stop working inside Views tables when Responsive Tables Filter is applied » AJAX operations not working inside tables when Responsive Tables Filter is applied
mark_fullmer’s picture

mark_fullmer’s picture

Status: Active » Fixed

Okay, 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!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.