Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to reproduce:
1. Open ctools modal popup several times on the same page (without reloading)
2. Close popup via escape key
3. The subsequent close event (CToolsDetachBehaviors) will be triggered multiple times (one time per each newly opened popup).
It caused by the fact that each time when we call Drupal.CTools.Modal.modalContent() we bind new event, and it does not unbind-ed sufficiently on close event.
Comment | File | Size | Author |
---|---|---|---|
#4 | 2781009-4.patch | 581 bytes | AkashKumar07 |
#2 | 7.x-1.9-multiple-close-event-2781009-2.patch | 1.01 KB | IRuslan |
Comments
Comment #2
IRuslan CreditAttribution: IRuslan as a volunteer and at DrupalJedi commentedComment #3
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 2 year old patch to modal.js does not apply to the latest ctools 7.x-1.x-dev.
Comment #4
AkashKumar07 CreditAttribution: AkashKumar07 at OpenSense Labs commentedReroll of #2.
Comment #5
joelpittetI noticed the event is different from when it was bound as well so changed that on commit. Thanks @IRuslan