Selectors within Drupal.attach behaviors not scoped properly

Created on 13 February 2017, over 7 years ago
Updated 18 December 2023, 6 months ago

Issue:
Easychart is not loading properly when present in an AJAX loaded content.

Reason:
jQuery selectors with the Drupal behaviors attach method are not scoped properly
easychart.render.js:10
var $container = $('.easychart-embed--' + key)[0];

Solution:
Scope jQuery selectors using the `context` passed by Drupal behaviors
easychart.render.js:10
var $container = $('.easychart-embed--' + key, context)[0];

πŸ› Bug report
Status

Needs review

Version

3.0

Component

Code

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024