Problem/Motivation
When we use Colorbox Modal and Video (lazy load) formatters the rendered field content moves to the video-embed-field-modal. But when JS adds it to the page, it does not restart Drupal Behaviors for the added content.
This can potentially break the Drupal Behaviors of the other modules. For example Cookie Content Blocker or the custom one.
Steps to reproduce
1. Configure the video embed field with a simple Video formatter
2. To avoid looking for a module that can make JS changes to the field, create a test library that makes some minimal changes to the field content. For example, adds a class.
3. Check if your test code is working
4. Change the Video formatter to Colorbox Modal or Video (lazy load) formatter.
5. Check if your test code is still working
Proposed resolution
Reattach Drupal Behaviors after adding content to the page.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | missing-drupal-behaviors-3313587-4.patch | 1.1 KB | hitchshock |
Issue fork video_embed_field-3313587
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
Comment #2
hitchshockComment #3
hitchshockComment #4
hitchshockComment #7
reszlicreated an MR with the changes, also getting rid of the jquery/once in favour of core/once
Comment #10
joumLatest MR21 patch does not apply on 3.0.0-beta2
Comment #12
mably commented@joum MR 21 is targeting the
8.x-2.xbranch, use MR 85 for the3.xversion.Comment #13
mably commentedComment #14
mably commentedCould we have some RTBC please?
Comment #16
mably commented