Skip to content

Conversation

@chipgw
Copy link
Contributor

@chipgw chipgw commented Dec 24, 2025

Holding control while dragging text to copy it was being blocked by link handling stopping the propogation of the mouse event; solution: don't handle link clicks when selection_drag_state is Dragging.

Issue found & fix tested on Linux (since the modifier key on mac is apparently different, the issue likely doesn't occur there, but I'm assuming it does apply to Windows).

I didn't see an issue open for it, and since I fixed it myself I'm unsure whether it needs one or if the PR is enough.

Release Notes:

  • Fix an issue where Ctrl+drag to duplicate selected text on Linux and Windows when the selection is inside a link.
Was being blocked by link handling; solution: don't handle link clicks
when selection_drag_state is Dragging
@cla-bot
Copy link

cla-bot bot commented Dec 24, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @chipgw on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@chipgw
Copy link
Contributor Author

chipgw commented Dec 24, 2025

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 24, 2025
@cla-bot
Copy link

cla-bot bot commented Dec 24, 2025

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Member

@smitbarmase smitbarmase left a comment

Choose a reason for hiding this comment

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

Thanks for handling it. Works as expected.

@smitbarmase smitbarmase merged commit dc40f21 into zed-industries:main Jan 6, 2026
25 checks passed
rtfeldman pushed a commit that referenced this pull request Jan 6, 2026
Holding control while dragging text to copy it was being blocked by link
handling stopping the propogation of the mouse event; solution: don't
handle link clicks when selection_drag_state is Dragging.

Issue found & fix tested on Linux (since the modifier key on mac is
apparently different, the issue likely doesn't occur there, but I'm
assuming it does apply to Windows).

I didn't see an issue open for it, and since I fixed it myself I'm
unsure whether it needs one or if the PR is enough.

Release Notes:

- Fix an issue where Ctrl+drag to duplicate selected text on Linux and
Windows when the selection is inside a link.
@chipgw
Copy link
Contributor Author

chipgw commented Jan 8, 2026

the modified release note text seems to misunderstand the problem (which indicates I didn't do a great job describing it to begin with). duplicating text by holding control and dragging it was completely non-functional, whether it was in a link or not. the code for handling links was the reason why, but it stops propagation of the mouse event regardless of whether there was a link to click or not.
it may actually be desirable to change it so it only absorbs the event when there was a link to click, but this change would still fix at least one edge-case that would exist (i.e. ctrl+dragging over a link, which seems to be what the release notes thinks the issue was)

LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…#45611)

Holding control while dragging text to copy it was being blocked by link
handling stopping the propogation of the mouse event; solution: don't
handle link clicks when selection_drag_state is Dragging.

Issue found & fix tested on Linux (since the modifier key on mac is
apparently different, the issue likely doesn't occur there, but I'm
assuming it does apply to Windows).

I didn't see an issue open for it, and since I fixed it myself I'm
unsure whether it needs one or if the PR is enough.

Release Notes:

- Fix an issue where Ctrl+drag to duplicate selected text on Linux and
Windows when the selection is inside a link.
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…#45611)

Holding control while dragging text to copy it was being blocked by link
handling stopping the propogation of the mouse event; solution: don't
handle link clicks when selection_drag_state is Dragging.

Issue found & fix tested on Linux (since the modifier key on mac is
apparently different, the issue likely doesn't occur there, but I'm
assuming it does apply to Windows).

I didn't see an issue open for it, and since I fixed it myself I'm
unsure whether it needs one or if the PR is enough.

Release Notes:

- Fix an issue where Ctrl+drag to duplicate selected text on Linux and
Windows when the selection is inside a link.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

2 participants