Open lyahdav opened 3 years ago
I think the reason is the same as in https://github.com/microsoft/microsoft-ui-xaml/issues/5833 - never yet shown AppBarButtons in secondary commands are measured wrong. You can try the workaround from https://github.com/microsoft/microsoft-ui-xaml/issues/5833 till the underlying issue would be fixed in MUX
@lyahdav and @eugenegff this issues is very familiar and I think actually fixed, however in the system xaml code that shipped with the one of the WindowsInsiderProgram builds of Windows 11. Do either of you have the ability to check if your repro happens on a windows 11 device?
@StephenLPeters I just confirmed on Windows 11 21H2 (OS Build 22000.120) the issue is fixed! I attempted repro in XAML Controls Gallery app. Are there plans to add a workaround in WinUI 2?
Windows 11, 10.0.22000.184 - problem still exist, screenshots and details regarding reproducibility are in #5833
@eugenegff maybe this means that #5833 is a different bug since I couldn't repro on an older Windows 11 build than you tested?
@eugenegff maybe this means that #5833 is a different bug since I couldn't repro on an older Windows 11 build than you tested?
I think that the underlying bug - is wrong measure of AppBarButton items that would be used as secondary commands in CommandBarFlyout, and the code inside CommandBarFlyout that relies on results of wrong measure. If your case could be fixed using MeasureOverride workaround from #5833 on Windows 10 - it is the same bug.
I wonder what changed in Windows 11 - as measured size of AppBarButton is still wrong. Some subtle animation on screen hints that may be Popup after layouting and resizing to proper smaller size probably realign itself to calculated bottom border of the too large measured rect - but it seems to be unreliable, as bug still could be reproduced in some cases on Win11.
The worst is that seems that it depends on styles, so while now frequency is lowered - it could go high again with seemingly innocent change in styling.
@llongley what was the nature of the system xaml change that "fixed" this issue in windows 11? Is it possible we missed some cases?
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Based on comments above this should probably still stay open
Describe the bug
TextCommandBarFlyout does not position correctly when TextBox is towards bottom of screen.
Steps to reproduce the bug
Steps to reproduce the behavior:
Expected behavior Expected: TextCommandBarFlyout opens in correct position. Actual: TextCommandBarFlyout opens in wrong position.
Screenshots
Version Info I'm on version 1.2.20.0 of XAML Controls Gallery.
Additional context I also confirmed this issue happens when using TextCommandBarFlyout from WinUI version 2.7.0-prerelease.210816001 both in UWP app and in Islands app. Here's an example project demonstrating that: https://github.com/lyahdav/XamlPlayground/tree/text-box-with-win-ui-2-cbf