diff options
author | 2022-10-29 01:45:00 +0200 | |
---|---|---|
committer | 2022-10-29 01:45:00 +0200 | |
commit | 0eb24bd56a1e0d1308c8317269cbc113760ccc3b (patch) | |
tree | c370c8cd66726e18bfaa77b9296c231789358d0c /native | |
parent | 82217947aa80287282ed6deb02d238a31303e0d6 (diff) | |
parent | f8c363eeacc6c0875834ea1b241de4540f55ba0c (diff) | |
download | iced-0eb24bd56a1e0d1308c8317269cbc113760ccc3b.tar.gz iced-0eb24bd56a1e0d1308c8317269cbc113760ccc3b.tar.bz2 iced-0eb24bd56a1e0d1308c8317269cbc113760ccc3b.zip |
Merge pull request #1496 from tarkah/fix/dropdown-scrollable
Fix drop down not closing when inside scrollable
Diffstat (limited to 'native')
-rw-r--r-- | native/src/widget/pick_list.rs | 6 |
1 files changed, 3 insertions, 3 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) { |