Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If you expand and collapse a PickList, then expand a different one, the first one briefly re-expands #1527

Closed
2 tasks done
mtkennerly opened this issue Nov 11, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@mtkennerly
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

  • If you expand PickList 1, do not collapse it, and then expand PickList 2, it transitions smoothly.
  • If you expand PickList 1, collapse it, and then expand PickList 2, the issue occurs. PickList 1 will re-expand briefly before PickList 2 expands.
5VeISaQwy6.mp4

To reproduce this, run the pick_list example with these changes (relative to commit 23299a5):

diff --git a/examples/pick_list/src/main.rs b/examples/pick_list/src/main.rs
index 9df1f5c7..f0fa42dd 100644
--- a/examples/pick_list/src/main.rs
+++ b/examples/pick_list/src/main.rs
@@ -35,17 +35,25 @@ impl Sandbox for Example {
     }
 
     fn view(&self) -> Element<Message> {
-        let pick_list = pick_list(
+        let pick_list1 = pick_list(
             &Language::ALL[..],
             self.selected_language,
             Message::LanguageSelected,
         )
         .placeholder("Choose a language...");
 
+        let pick_list2 = pick_list(
+            &Language::ALL[..],
+            self.selected_language,
+            Message::LanguageSelected,
+        )
+        .placeholder("Choose another language...");
+
         let content = column![
             vertical_space(Length::Units(600)),
             "Which is your favorite language?",
-            pick_list,
+            pick_list1,
+            pick_list2,
             vertical_space(Length::Units(600)),
         ]
         .width(Length::Fill)

What is the expected behavior?

After collapsing PickList 1, it should not re-expand before PickList 2 expands.

Version

master

Operative System

Windows

Do you have any log output?

No response

@mtkennerly mtkennerly added the bug Something isn't working label Nov 11, 2022
@mtkennerly
Copy link
Contributor Author

This is similar/related to #1484, but that one is about mismatched options (PickList 2's options appear in PickList 1's overlay just before PickList 1 collapses), whereas this ticket is about PickList 1's overlay reappearing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant