diff --git a/crates/app/src/story_workspace.rs b/crates/app/src/story_workspace.rs index 4be99858..97b6ca46 100644 --- a/crates/app/src/story_workspace.rs +++ b/crates/app/src/story_workspace.rs @@ -1,7 +1,7 @@ use anyhow::Result; use gpui::*; use prelude::FluentBuilder as _; -use private::serde::Deserialize; +use serde::Deserialize; use std::{sync::Arc, time::Duration}; use story::{ ButtonStory, CalendarStory, DropdownStory, IconStory, ImageStory, InputStory, ListStory, diff --git a/crates/ui/src/list/list_item.rs b/crates/ui/src/list/list_item.rs index 33a07bff..be71271a 100644 --- a/crates/ui/src/list/list_item.rs +++ b/crates/ui/src/list/list_item.rs @@ -1,6 +1,6 @@ use gpui::{ div, prelude::FluentBuilder as _, AnyElement, ClickEvent, Div, ElementId, InteractiveElement, - IntoElement, MouseMoveEvent, ParentElement, RenderOnce, SharedString, Stateful, + IntoElement, MouseButton, MouseMoveEvent, ParentElement, RenderOnce, SharedString, Stateful, StatefulInteractiveElement as _, Styled, WindowContext, }; use smallvec::SmallVec; @@ -128,7 +128,12 @@ impl RenderOnce for ListItem { .justify_between() .when_some(self.on_click, |this, on_click| { if !self.disabled { - this.cursor_pointer().on_click(on_click) + this.cursor_pointer() + .on_mouse_down(MouseButton::Left, move |_, cx| { + cx.stop_propagation(); + cx.prevent_default(); + }) + .on_click(on_click) } else { this }