Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix Div::active not working
Antonio Scandurrae53b9f5ccf6f
diff --git a/crates/gpui2/src/elements/div.rs b/crates/gpui2/src/elements/div.rsindex 22ae154ca82..076afa8db73 100644--- a/crates/gpui2/src/elements/div.rs+++ b/crates/gpui2/src/elements/div.rs@@ -984,7 +984,7 @@ impl Interactivity {}let active_state = element_state.clicked_state.clone();- if !active_state.borrow().is_clicked() {+ if active_state.borrow().is_clicked() {cx.on_mouse_event(move |_: &MouseUpEvent, phase, cx| {if phase == DispatchPhase::Capture {*active_state.borrow_mut() = ElementClickedState::default();diff --git a/crates/storybook2/src/stories/focus.rs b/crates/storybook2/src/stories/focus.rsindex 6dc81876900..a3a8845947d 100644--- a/crates/storybook2/src/stories/focus.rs+++ b/crates/storybook2/src/stories/focus.rs@@ -66,9 +66,11 @@ impl Render for FocusStory {let color_4 = theme.status().conflict;let color_5 = theme.status().ignored;let color_6 = theme.status().renamed;+ let color_7 = theme.status().hint;div().id("parent")+ .active(|style| style.bg(color_7)).track_focus(&self.parent_focus).key_context("parent").on_action(cx.listener(|_, _action: &ActionA, _cx| {