[Bug] Clipboard fallback reports success even when copying fails
Maintainer antworten meist innerhalb von 1 Tag
@srikar-naidu arbeitet bereits daran.
Seit 31.10.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Describe the bug
The copy actions show a success message even when copying fails. If the modern Clipboard API is unavailable or rejects the request, the fallback uses document.execCommand('copy') but does not verify whether the command succeeded.
To Reproduce
- Open the OG image editor.
- Block clipboard permissions or use a browser where clipboard access is unavailable.
- Click Copy Image URL or Copy Meta Tags.
- Observe the notification.
Expected behavior
The app should show a success message only when the content is actually copied. If both copy methods fail, it should display an error message.
Actual behavior
The app shows “URL copied to clipboard!” or “Meta tags copied!” even when the fallback copy operation fails.
Screenshots
Not applicable. A screenshot of the misleading success notification may be added if available.
Environment
- Browser: Chrome
- OS: Windows 11
- Node version: 22.x
- npm version: 10.x
- URL: Local OG image editor
Additional context
The fallback currently performs the copy without checking the result:
document.execCommand('copy');
document.body.removeChild(ta);
setCopied(label);
window.showToast?.('URL copied to clipboard!', 'success');
document.execCommand('copy') returns a boolean. The result should be checked, and an error notification should be shown when it returns false or throws.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 8
- Forks
- 4
- Ø Merge
- 8 Std. 47 Min.
- Gemergte PRs (30 T.)
- 157
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus codercops/ogcops
-
[Bug] “Copy Recommended Meta Tags” generates an unusable placeholder image URLEvtl. vergeben @CreatorguyS hat das vor 2 Tagen übernommen. Offenbug enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
codercops/ogcops#378 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Preview checker: entity names like `&constructor;` decode to function sourceEvtl. vergeben @amitsinha-cell hat das vor 3 Tagen übernommen. Offenbug
codercops/ogcops#356 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add the Do and Don't tutorial template (`tutorial-do-dont`)Evtl. vergeben @Ravindar-Amogh-Gummadavelly hat das vor 3 Tagen übernommen. Offengood first issue templates
codercops/ogcops#355 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
codercops/ogcops#341 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 35/100
codercops/ogcops#88 · 16 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in codercops/ogcops
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
Broken links in the docsOffen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 83/100
Maintainer antworten meist innerhalb von 1 Tag
-
🔊 a11y
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
betagouv/mon-entreprise#4726 ·
Maintainer antworten meist innerhalb von 9 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Deltares/fews-pi-requests#357 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug confirmed js v6
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag