editor: Dismiss drag selection when dropped outside editor (#32382)

This PR fixes two issues:

1. On macOS, using Alt to copy the selection instead of cutting it.
2. Dropping the drag selection outside the editor dismisses it.  


https://github.com/user-attachments/assets/341e21c3-3eca-4e58-9bcc-8ec1de18e999


Release Notes:

- N/A

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
This commit is contained in:
CharlesChen0823 2025-06-10 18:11:59 +08:00 committed by GitHub
parent 2dad48d8d9
commit eb5f59577d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 14 deletions

View file

@ -918,6 +918,7 @@ enum SelectionDragState {
Dragging {
selection: Selection<Anchor>,
drop_cursor: Selection<Anchor>,
hide_drop_cursor: bool,
},
}