Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
gpui: Do not emit MouseUpEvent when exiting drag & drop (#9273)
Piotr Osiewicz427d66990c57
diff --git a/crates/gpui/src/window.rs b/crates/gpui/src/window.rsindex 23b01c94628..a047b9cbd2e 100644--- a/crates/gpui/src/window.rs+++ b/crates/gpui/src/window.rs@@ -1157,12 +1157,10 @@ impl<'a> WindowContext<'a> {click_count: 1,})}- FileDropEvent::Exited => PlatformInput::MouseUp(MouseUpEvent {- button: MouseButton::Left,- position: Point::default(),- modifiers: Modifiers::default(),- click_count: 1,- }),+ FileDropEvent::Exited => {+ self.active_drag.take();+ PlatformInput::FileDrop(FileDropEvent::Exited)+ }},PlatformInput::KeyDown(_) | PlatformInput::KeyUp(_) => event,};