-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
editor: Fix ctrl+drag/drop to duplicate selected text #45611
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
Conversation
Was being blocked by link handling; solution: don't handle link clicks when selection_drag_state is Dragging
|
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'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
smitbarmase
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.
Thanks for handling it. Works as expected.
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.
|
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. |
…#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.
…#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.
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: