-
Notifications
You must be signed in to change notification settings - Fork 39
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
PopupMenu keeps changing position - default position isn't deterministic #384
Comments
I'm not sure if the different choice was intentional but unlike the Material style |
not intentional, I thought under means under the button :) |
I checked this again with the latest from main and the issue is still reproducible. I'll give this a look tomorrow. |
Did some further digging and found that getting rid of the initialValue field makes the first popupMenuButton behave like the other 2. We probably still want to set an initial value so this is most likely a bug with how flutter does its layout for the PopupMenuItem widget. simplescreenrecorder-2022-11-16_04.19.19.mp4 |
Ah! Weird! Well, yeah we can not get rid of this in general :S So I guess we either fix this in flutter (haha) or live with it? |
Opened up an issue at flutter/flutter#115509 with a linked PR that fixes the general PopupMenuButton misalignment. It's still doesn't perfectly fix our issue here, but I suspect that is because a MenuItem has a slightly different height from a YaruMenuItem.
It's been bugging me too much haha 😅 |
I tried out the web demo for the Yaru widget library and found that the PopupButton seems to act a little weird sometimes.
For the first of the 3 buttons in the example, the popup options come out below the popup button albeit not completely. When the value is changed to option 2 or 3, the popup options are displayed over the popup button. I don't know if this is intended behaviour but I personally think the behaviour should be constant.
For the next 2 buttons, the popup options are correctly under the popup button but one is aligned to the left whilst the other is displayed to the right. Is this intended behaviour?
Video of the behaviour for each button:
simplescreenrecorder-2022-11-15_02.27.07.mp4
The text was updated successfully, but these errors were encountered: