You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unsure if this is a core issue, or a problem with EU Cookie Compliance, or both. This was originally reported in the forum, and there is a new issue in the EU Cookie Compliance module. I'm posting it here as well in case this is a problem with core.
There are at least two JS files with event listeners attached to more/less toggle links which are being attached twice: modules.js and status.js. This causes the listener to fire twice, effectively canceling the action (open/close of toggle in rapid succession - this can only be detected with a JS breakpoint, as it's not visually possible to detect).
Steps To Reproduce
Install EU Cookie Compliance
Visit admin/modules/list and admin/reports/status
Click the more/less toggle -nothing seems to happen (no opening or closing)
To verify this is called twice:
Deselect "Aggregate Javascript files" in admin/config/development/performance . Navigate to admin/modules/list
In Chrome's dev tools -> Sources, find modules.js and insert a breakpoint in line 20
Click the more/less toggle and watch the callback function being called twice
Additional information
Some other js files like contextual.js seem unaffected. One thing I noticed is that contextual.js wraps all the listener attachments with a jQuery.once(), which effectively avoids the double-attachment of listeners. So, I'm wondering if jQuery.once() should also be used in modules.js and status.js to wrap these attachers?
Backdrop CMS version: 1.22.0
Chrome v. 103
The text was updated successfully, but these errors were encountered:
Description of the bug
I'm unsure if this is a core issue, or a problem with EU Cookie Compliance, or both. This was originally reported in the forum, and there is a new issue in the EU Cookie Compliance module. I'm posting it here as well in case this is a problem with core.
There are at least two JS files with event listeners attached to more/less toggle links which are being attached twice: modules.js and status.js. This causes the listener to fire twice, effectively canceling the action (open/close of toggle in rapid succession - this can only be detected with a JS breakpoint, as it's not visually possible to detect).
Steps To Reproduce
To verify this is called twice:
Additional information
Some other js files like contextual.js seem unaffected. One thing I noticed is that contextual.js wraps all the listener attachments with a jQuery.once(), which effectively avoids the double-attachment of listeners. So, I'm wondering if jQuery.once() should also be used in modules.js and status.js to wrap these attachers?
The text was updated successfully, but these errors were encountered: