Skip to content

fix: prevent double clipboard alert on copy action#1265

Merged
HardeepAsrani merged 6 commits intodevelopmentfrom
fix/issue-530
Mar 10, 2026
Merged

fix: prevent double clipboard alert on copy action#1265
HardeepAsrani merged 6 commits intodevelopmentfrom
fix/issue-530

Conversation

@HardeepAsrani
Copy link
Copy Markdown
Member

Summary

render-facade.js could be loaded more than once (registered under multiple handles when charts from different libraries appear on the same page). The copy ClipboardJS instance had no guard against double-initialization, causing the success alert to fire twice.

Added vizClipboard2 guard to mirror the existing vizClipboard1 pattern already used for the shortcode copy button.

Will affect visual aspect of the product

YES/NO

Screenshots

Test instructions

  • Make sure the Copy button doesn't trigger two alert notices.

Check before Pull Request is ready:

Closes https://github.com/Codeinwp/visualizer-pro/issues/530.

render-facade.js could be loaded more than once (registered under
multiple handles when charts from different libraries appear on the
same page). The copy ClipboardJS instance had no guard against
double-initialization, causing the success alert to fire twice.

Added vizClipboard2 guard to mirror the existing vizClipboard1
pattern already used for the shortcode copy button.
@HardeepAsrani HardeepAsrani added the pr-checklist-skip Allow this Pull Request to skip checklist. label Mar 6, 2026
@pirate-bot pirate-bot added pr-checklist-complete The Pull Request checklist is complete. (automatic label) labels Mar 6, 2026
@pirate-bot
Copy link
Copy Markdown
Contributor

pirate-bot commented Mar 6, 2026

Plugin build for 1cbc093 is ready 🛎️!

@HardeepAsrani HardeepAsrani merged commit 184ae3e into development Mar 10, 2026
7 of 8 checks passed
@HardeepAsrani HardeepAsrani deleted the fix/issue-530 branch March 10, 2026 17:54
@pirate-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 4.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist. released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants