fix: allow modifier keys for import links in package code#1309
fix: allow modifier keys for import links in package code#1309danielroe merged 1 commit intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughThe pull request modifies the import link click handler in the Code Viewer component. It introduces type safety by specifying the return type for the DOM query selector as HTMLAnchorElement and adds a conditional guard that prevents click handling when modifier keys (meta, alt, control, or shift) are pressed, allowing standard browser behaviour to occur instead. Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Comment |
follow-up to #1307 (comment)
I copied the conditions from vue-router: https://github.com/vuejs/router/blob/49b925d2042d2b9e8a75dc8eeb2578045a07d6c7/packages/router/src/RouterLink.ts#L414
I dont think we need to copy its other guards for now 🤔