Listener on trigger can get added multiple times, breaking functionality

Created on 31 July 2023, 11 months ago
Updated 31 May 2024, 26 days ago

Problem/Motivation

In some cases, the "attach" function of "Drupal.behaviors.viewsExpandableTable" gets called multiple times on a context that includes the same views table. This causes the trigger click event handler to be added multiple times on the same trigger. The result is that clicking the trigger seems to do nothing: the expandable row gets toggled twice in a row so it stays collapsed.

Proposed resolution

Implement jquery Once or manually add a "processed" class to the trigger to prevent the event handler from being added multiple times.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇧🇪Belgium gillesv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024