# clipboard-copy adaptation

- Upstream: https://github.com/feross/clipboard-copy
- Fixed release: `v4.0.1`, commit `17053e4ee4b117eb03d9419918c43e8a6e73de8b`.
- Original file: https://github.com/feross/clipboard-copy/blob/17053e4ee4b117eb03d9419918c43e8a6e73de8b/index.js
- Copyright (c) Feross Aboukhadijeh. Full MIT terms in `LICENSE`.
- `upstream-index.js` is the unmodified source snapshot, not a runtime module.

`clipboard.mjs` adapts the actual Async Clipboard → selected span / execCommand fallback. EssayPilot modifications (2026-10-02): ESM and injected browser objects; retain text ranges and textarea caret/direction/scroll; temporary fixed-position span; cleanup even when selection setup throws; caller ownership check before a delayed fallback; no prompt or clipboard read. This compatibility path is browser-dependent, not a guarantee that permission denial can always be bypassed. Only an explicit copy gesture invokes it; both failures are reported to the user. No runtime CDN, npm install, or third-party request.
