Commit 982a456
docs: Update clipboard handling for Safari compatibility in LLMButtons (#2258)
https://wolfgangrittner.dev/how-to-use-clipboard-api-in-safari/
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Small, localized change to a UI clipboard action; main risk is browser
support/behavior differences for `ClipboardItem` and async fetch
failures.
>
> **Overview**
> Updates the `LLMButtons` “Copy for LLM” flow to write fetched Markdown
to the clipboard via `navigator.clipboard.write([new
ClipboardItem(...)])` instead of `writeText`, avoiding Safari rejecting
clipboard operations when the fetch is awaited before the write.
>
> Adds an in-function debug `console.log` of the created
`ClipboardItem`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8ecd7a9. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>1 parent fad13e7 commit 982a456
1 file changed
Lines changed: 14 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
179 | 184 | | |
180 | | - | |
181 | | - | |
| 185 | + | |
182 | 186 | | |
183 | 187 | | |
184 | 188 | | |
| |||
0 commit comments