Do not report BibTeX copied when clipboard writing fails
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start in the Pages source at the BibTeX Copy button entry point and inspect both the Clipboard API promise handling and the legacy document.execCommand('copy') fallback. Reproduce the rejected write described in the issue, then verify that only confirmed writes show “Copied!” and failed attempts expose an error state.
Written by the indexing model from the issue text.
Description
Problem
The BibTeX copy button reports success even when the clipboard write fails in the current Pages source (web@66efcf4f1f8a4aaf5cc937e5b6d5bd9724f3ea04).
The Clipboard API path calls the same success callback for both resolution and rejection:
navigator.clipboard.writeText(text).then(done).catch(done);
The legacy fallback also ignores the boolean result of document.execCommand('copy') and calls done() unconditionally.
Reproduction
- Open https://bytedance.github.io/TableVerse/#bibtex in a browser context where clipboard writes are denied by permission or policy.
- Click Copy.
- Observe that the button changes to Copied! although the clipboard was not updated.
The rejection path can also be reproduced deterministically by replacing navigator.clipboard.writeText with a Promise that rejects before clicking the button.
Expected behavior
The button should show success only after a confirmed clipboard write. If the modern API fails, the page may attempt the existing fallback, but a failed fallback should expose a clear error state.
Actual behavior
Both success and failure paths display Copied!.
Impact
Users may paste stale or unrelated clipboard content after receiving a false success message.
Environment
- Source:
web@66efcf4f1f8a4aaf5cc937e5b6d5bd9724f3ea04 - Live Pages deployment: https://bytedance.github.io/TableVerse/
- Affects browsers or embedded contexts that reject clipboard access
- Dominant language
- No language data
- Stars
- 25
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bytedance/TableVerse
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
bytedance/TableVerse#15 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bytedance/TableVerse#13 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
bytedance/TableVerse#11 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
bytedance/TableVerse#3 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
bytedance/TableVerse#19 ·
All issues in bytedance/TableVerse
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug ready-for-dev
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 92/100