inspector
inspector copied to clipboard
fix(client): fall back when config clipboard copy is blocked
Fixes #913.
The Sidebar copy buttons now fall back to a temporary textarea + execCommand copy when navigator.clipboard.writeText is unavailable or rejected. That avoids the browser warning/popup path seen in self-hosted or permission-restricted Inspector setups while keeping the copied JSON unchanged.
Validation:
- client/src/components/tests/Sidebar.test.tsx
- npm run lint (client)
- npx prettier --check client/src/components/Sidebar.tsx client/src/components/tests/Sidebar.test.tsx
- npm install (repo build ran via prepare)
The fallback is only used when Clipboard API copy fails; normal clipboard writes still use navigator.clipboard.writeText.