diff --git a/native/src/widget/pane_grid.rs b/native/src/widget/pane_grid.rs index dfff388b..5180fd3b 100644 --- a/native/src/widget/pane_grid.rs +++ b/native/src/widget/pane_grid.rs @@ -496,7 +496,10 @@ where } } } else { - self.state.unfocus(); + // TODO: Encode cursor availability in the type system + if cursor_position.x > 0.0 && cursor_position.y > 0.0 { + self.state.unfocus(); + } } } mouse::Event::ButtonReleased(mouse::Button::Left) => { diff --git a/native/src/widget/pick_list.rs b/native/src/widget/pick_list.rs index 3e83fa56..04478225 100644 --- a/native/src/widget/pick_list.rs +++ b/native/src/widget/pick_list.rs @@ -227,6 +227,7 @@ where match event { Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) => { if *self.is_open { + // TODO: Encode cursor availability in the type system *self.is_open = cursor_position.x < 0.0 || cursor_position.y < 0.0; } else if layout.bounds().contains(cursor_position) {