Skip to content

Conversation

lukocode
Copy link

Fixes intermittent clipboard copy failures for SVG output where users
encountered "No blob data to write to clipboard" errors. The issue was
caused by a race condition where canvas operations proceeded before
the dynamically created Image element finished loading the SVG data URL.

  • Add ensureImageLoaded helper to wait for image load completion
  • Handle both already-loaded and loading states
  • Include error handling and 5-second timeout protection
  • Maintain backward compatibility with existing image copy functionality

Fixes intermittent clipboard copy failures for SVG output where users
encountered "No blob data to write to clipboard" errors. The issue was
caused by a race condition where canvas operations proceeded before
the dynamically created Image element finished loading the SVG data URL.
- Add ensureImageLoaded helper to wait for image load completion
- Handle both already-loaded and loading states
- Include error handling and 5-second timeout protection
- Maintain backward compatibility with existing image copy functionality
@mjbvz mjbvz assigned rebornix and amunger and unassigned mjbvz Aug 28, 2025
@amunger
Copy link
Collaborator

amunger commented Sep 3, 2025

is there an issue that can be linked to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants