Skip to content

Conversation

@chirag-bruno
Copy link
Contributor

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

@chirag-bruno chirag-bruno changed the base branch from main to feature/cmd-click-to-links-internal October 29, 2025 17:11
@sid-bruno sid-bruno mentioned this pull request Nov 12, 2025
5 tasks
Copy link
Collaborator

@sid-bruno sid-bruno left a 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

Comment on lines 176 to 177
if (this.editor?._destroyLinkAware) {
this.editor?._destroyLinkAware?.();
Copy link
Collaborator

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

Comment on lines 161 to 162
if (this.editor?._destroyLinkAware) {
this.editor?._destroyLinkAware?.();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as previous comment

Comment on lines 11 to 17
function debounce(fn, delay) {
let timer;
return function (...args) {
clearTimeout(timer);
timer = setTimeout(() => fn.apply(this, args), delay);
};
}
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants