diff --git a/crates/oa-desktop/src/behavior/canvas_workspace/control.rs b/crates/oa-desktop/src/behavior/canvas_workspace/control.rs index 6e199cca..814ba192 100644 --- a/crates/oa-desktop/src/behavior/canvas_workspace/control.rs +++ b/crates/oa-desktop/src/behavior/canvas_workspace/control.rs @@ -158,14 +158,12 @@ impl Widget for Contro if matches!( event, Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) - ) { - if !layout - .bounds() - .intersection(viewport) - .is_some_and(|bounds| cursor.is_over(bounds)) - { - state.focused = false; - } + ) && !layout + .bounds() + .intersection(viewport) + .is_some_and(|bounds| cursor.is_over(bounds)) + { + state.focused = false; } } if matches!(event, Event::Window(iced::window::Event::Unfocused)) {