Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix stuck click styling when dragging off of a button

Mikaylaff75d1663b43
diff --git a/crates/gpui/src/app/window.rs b/crates/gpui/src/app/window.rs
index 543b1002840..4b8b0534d53 100644
--- a/crates/gpui/src/app/window.rs
+++ b/crates/gpui/src/app/window.rs
@@ -788,6 +788,11 @@ impl<'a> WindowContext<'a> {
.contains_point(self.window.mouse_position)
{
valid_regions.push(mouse_region.clone());
+ } else {
+ // Let the view know that it hasn't been clicked anymore
+ if mouse_region.notify_on_click {
+ notified_views.insert(mouse_region.id().view_id());
+ }
}
}
}