Skip to content

fix: add legacy support for clipboard copy functionality#2162

Closed
rzzf wants to merge 1 commit intonpmx-dev:mainfrom
rzzf:fix/2151
Closed

fix: add legacy support for clipboard copy functionality#2162
rzzf wants to merge 1 commit intonpmx-dev:mainfrom
rzzf:fix/2151

Conversation

@rzzf
Copy link
Contributor

@rzzf rzzf commented Mar 20, 2026

🔗 Linked issue

resolves #2151

🧭 Context

📚 Description

@vercel
Copy link

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Mar 20, 2026 3:44am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Mar 20, 2026 3:44am
npmx-lunaria Ignored Ignored Mar 20, 2026 3:44am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 89840163-9aa8-4147-94d7-86a50ef732b8

📥 Commits

Reviewing files that changed from the base of the PR and between a0dd2a9 and a381181.

📒 Files selected for processing (1)
  • app/pages/package/[[org]]/[name].vue

📝 Walkthrough

Walkthrough

The pull request modifies the useClipboard configuration for the README Markdown copy functionality in the package page. It adds the legacy: true option to the clipboard copy handler, enabling a fallback mechanism whilst maintaining the existing source and copiedDuring parameters.

Possibly related PRs

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The linked issue requires fallback to document.execCommand('copy') via hidden textarea, but the PR only adds legacy:true to useClipboard configuration without implementing the suggested fix. Implement the suggested fallback mechanism to document.execCommand('copy') when navigator.clipboard.writeText() fails, ensuring compatibility with Safari's synchronicity requirements.
Description check ❓ Inconclusive The pull request description is incomplete and vague, providing only a template with linked issue reference but no meaningful context or explanation of the changes. Add a detailed description explaining why the legacy clipboard configuration was added and how it addresses the Safari clipboard synchronicity issue.
✅ Passed checks (1 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The single-line change adding legacy:true is in-scope but appears insufficient to address the root cause of the Safari clipboard issue described in #2151.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use OpenGrep to find security vulnerabilities and bugs across 17+ programming languages.

OpenGrep is compatible with Semgrep configurations. Add an opengrep.yml or semgrep.yml configuration file to your project to enable OpenGrep analysis.

@codecov
Copy link

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/pages/package/[[org]]/[name].vue 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@rzzf
Copy link
Contributor Author

rzzf commented Mar 20, 2026

This doesn't seem to have any effect.

@rzzf rzzf closed this Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Copy as Markdown" button on README doesn't copy to clipboard in Safari

1 participant