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

Flyout in ListView doesn't open for selected item #7838

Closed
1 of 2 tasks
davidegiacometti opened this issue Oct 16, 2022 · 3 comments
Closed
1 of 2 tasks

Flyout in ListView doesn't open for selected item #7838

davidegiacometti opened this issue Oct 16, 2022 · 3 comments
Labels
bug Something isn't working team-Controls Issue for the Controls team

Comments

@davidegiacometti
Copy link

Describe the bug

Sample: https://github.com/davidegiacometti/flyout-bug

ListView with an AttachedFlyout on the item.
RightTapped on the item show the flyout.

Steps to reproduce the bug

Usually happens if you reproduce the steps 2 or 3 times in a row fast.
1 select an item of the list
2 right click
3 flyout not showed

Expected behavior

Flyout should always be opened

Screenshots

Bug

Red dot: mouse right click

NuGet package version

WinUI 3 - Windows App SDK 1.1.5

Windows app type

  • UWP
  • Win32

Device form factor

Desktop

Windows version

Windows 10 (21H2): Build 19044

Additional context

No response

@davidegiacometti davidegiacometti added the bug Something isn't working label Oct 16, 2022
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Oct 16, 2022
@bpulliam bpulliam added team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Oct 27, 2022
@davidegiacometti
Copy link
Author

I have news.
The issue is in the ShowAt call:

flyoutBase.ShowAt(owner, new FlyoutShowOptions
{
    Position = e.GetPosition(owner),
});

If I pass ShowMode = FlyoutShowMode.Transient the issue doesn't happen but the context menu doesn't get focus.

@davidegiacometti
Copy link
Author

Still happening with latest stable 1.3.230602002 and latest preview 1.4.230628000.

@ranjeshj
Copy link
Contributor

This seems to work fine for me. I do see that sometime the flyout does not open. That might be because the right_tapped handler is on the TextBlock and there is area outside the TextBlock where you can click. Adding the handler on the ListViewItem itself might avoid that.

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

No branches or pull requests

3 participants