[Bug] Clipboard fallback reports success even when copying fails
Maintainer thường phản hồi trong vòng 1 ngày
@srikar-naidu đang làm issue này rồi.
Từ ngày 31/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 8
- Fork
- 4
- Merge trung bình
- 8 giờ 47 phút
- Pull request đã merge (30 ngày)
- 157
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của codercops/ogcops
-
[Bug] “Copy Recommended Meta Tags” generates an unusable placeholder image URLCó thể đã có người làm @CreatorguyS đã nhận 3 ngày trước. Đang mởbug enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
codercops/ogcops#378 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Preview checker: entity names like `&constructor;` decode to function sourceCó thể đã có người làm @amitsinha-cell đã nhận 3 ngày trước. Đang mởbug
codercops/ogcops#356 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add the Do and Don't tutorial template (`tutorial-do-dont`)Có thể đã có người làm @Ravindar-Amogh-Gummadavelly đã nhận 3 ngày trước. Đang mởgood first issue templates
codercops/ogcops#355 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
codercops/ogcops#341 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
codercops/ogcops#88 · 16 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của codercops/ogcops
Issue tương tự
-
area: frontend priority: normal
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
formbricks/formbricks#9918 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Chat: Resize question overlayĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
thecodacus/pithagoras#364 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
TestAutonomousStop_ReportsObservedState fails under host load: 1s wall-clock ceiling vs 250ms cycleĐang mởtype:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
nightgauge/nightgauge#2909 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày