mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
8fae712a4f
Harden the code-block copy button so it works in the Assistant embed. The
async Clipboard API can be unavailable or reject in cross-origin iframe /
non-secure contexts, which threw an unhandled rejection and left the button
showing a false success. Fall back to execCommand('copy') and only show the
copied state when the write actually succeeds.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxDckjBnKCnQDGnuWufeKp