summaryrefslogtreecommitdiffstats
path: root/native/src
diff options
context:
space:
mode:
Diffstat (limited to 'native/src')
-rw-r--r--native/src/widget/pick_list.rs6
-rw-r--r--native/src/widget/text_input.rs6
2 files changed, 6 insertions, 6 deletions
diff --git a/native/src/widget/pick_list.rs b/native/src/widget/pick_list.rs
index c334804e..896f5b35 100644
--- a/native/src/widget/pick_list.rs
+++ b/native/src/widget/pick_list.rs
@@ -348,9 +348,9 @@ where
let state = state();
let event_status = if state.is_open {
- // TODO: Encode cursor availability in the type system
- state.is_open =
- cursor_position.x < 0.0 || cursor_position.y < 0.0;
+ // Event wasn't processed by overlay, so cursor was clicked either outside it's
+ // bounds or on the drop-down, either way we close the overlay.
+ state.is_open = false;
event::Status::Captured
} else if layout.bounds().contains(cursor_position) {
diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs
index c2d25520..e5213cbe 100644
--- a/native/src/widget/text_input.rs
+++ b/native/src/widget/text_input.rs
@@ -712,14 +712,14 @@ where
}
return event::Status::Captured;
+ } else {
+ state.is_pasting = None;
}
}
Event::Keyboard(keyboard::Event::ModifiersChanged(modifiers)) => {
let state = state();
- if state.is_focused {
- state.keyboard_modifiers = modifiers;
- }
+ state.keyboard_modifiers = modifiers;
}
_ => {}
}