fix(ui): make readme markdown copy work in safari#2182
fix(ui): make readme markdown copy work in safari#2182MathurAditya724 wants to merge 3 commits intonpmx-dev:mainfrom
Conversation
…ipboard legacy fallback
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a client-side conditional prefetch for README markdown (runs when Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
I re-tested this on WebKit/Safari with the latest changes and it now works reliably, including the first click after navigation. I added a loading state + markdown prefetch, and kept the clipboard legacy fallback. Here’s a quick demo - Screen.Recording.2026-03-22.at.12.34.08.PM.mp4 |
🔗 Linked issue
Fixes #2151
🧭 Context
The "Copy as Markdown" button in the README section wasn’t working in Safari.
It could fail silently because we were waiting for an async fetch before writing to clipboard.
📚 Description
This PR makes the README copy flow more reliable in Safari:
legacymode so it can fall back toexecCommand('copy')when neededResult: "Copy as Markdown" now works consistently, including Safari.