-
Notifications
You must be signed in to change notification settings - Fork 2k
Feature/cmd click on links #5927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/cmd-click-to-links-internal
Are you sure you want to change the base?
Feature/cmd click on links #5927
Conversation
…ution with the use of makeLinkAware
sid-bruno
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny nitpicks to be done
| if (this.editor?._destroyLinkAware) { | ||
| this.editor?._destroyLinkAware?.(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either keep the ?. exec pattern or the if condition
| if (this.editor?._destroyLinkAware) { | ||
| this.editor?._destroyLinkAware?.(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as previous comment
| function debounce(fn, delay) { | ||
| let timer; | ||
| return function (...args) { | ||
| clearTimeout(timer); | ||
| timer = setTimeout(() => fn.apply(this, args), delay); | ||
| }; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lodash is already a part of the package, use that instead of writing this
Description
This PR resolves issue #4982.
It introduces support for Cmd+Click (macOS) and Ctrl+Click (Windows/Linux) to open links directly, improving navigation and usability within the editor.
This work builds upon [@abansal21’s original contribution](#5160).
Due to merge conflicts and to ensure consistency across CodeMirror extension implementations, their approach has been slightly refined and the related tests have been updated.
References:
Contribution Checklist