From f252db74150541cf145d85bae652a789cc1f649b Mon Sep 17 00:00:00 2001 From: Jason Rodney Hansen Date: Sat, 11 Jan 2025 15:00:56 -0700 Subject: [PATCH] Fix left clicking in empty folder to clear context menu --- src/tab.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tab.rs b/src/tab.rs index a5e3f5d..75b62d8 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -3581,8 +3581,7 @@ impl Tab { pub fn empty_view(&self, has_hidden: bool) -> Element { let cosmic_theme::Spacing { space_xxs, .. } = theme::active().cosmic().spacing; - //TODO: left clicking on an empty folder does not clear context menu - widget::column::with_children(vec![widget::container( + mouse_area::MouseArea::new(widget::column::with_children(vec![widget::container( widget::column::with_children(match self.mode { Mode::App | Mode::Dialog(_) => vec![ widget::icon::from_name("folder-symbolic") @@ -3604,7 +3603,8 @@ impl Tab { .spacing(space_xxs), ) .center(Length::Fill) - .into()]) + .into()])) + .on_press(|_| Message::Click(None)) .into() }