Colorbox content doubled when next link is clicked

Created on 10 August 2023, over 1 year ago

First, thanks for this module. I couldn't get colorbox-load to work so this was a great solution with a very easy to use process.

Problem/Motivation

After opening a colorbox, clicking the close button (or clicking outside of the colorbox) hides the content but doesn't remove it from the page. This appears to be the normal process for a colorbox dialog. Clicking the link again or clicking another link doubles the colorbox content so it i necessary to click the close button twice to hide the colorbox. Clicking the link a third time doubles it again so that you must click the close button four times and so on.

Steps to reproduce

Create a page with a simple load link and click it. Close the colorbox and click the link again (or click another simple load link on the page). Click the close button (twice) to close it and click the link again. Click the close button four time to close the colorbox. Then 8 then 16 etc.

Proposed resolution

With a plain colorbox link, closing the dialog retains the code by hiding it. Clicking the next plain colorbox link replaces the hidden code and displays the new content. This seems like the best solution but I don't know how this would be done. I appreciate any suggestions anyone can offer.

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇨🇦Canada Cybertrail

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

Comments & Activities

Production build 0.71.5 2024