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

CalendarDatePicker's dropdown popup should close when the calendar gets hidden #15735

Open
MrJul opened this issue May 15, 2024 · 1 comment
Open
Labels

Comments

@MrJul
Copy link
Member

MrJul commented May 15, 2024

Describe the bug

When a CalendarDatePicker gets hidden, its date dropdown stays open.
It should be closed instead.

ComboBox does this correctly.

To Reproduce

XAML:

<CalendarDatePicker x:Name="Picker" CalendarOpened="OnPickerCalendarOpened" />

Code-behind:

private void OnPickerCalendarOpened(object? sender, EventArgs e)
    => DispatcherTimer.RunOnce(() => Picker.IsVisible = false, TimeSpan.FromSeconds(2));

Open the calendar and wait 2 seconds.

Expected behavior

The calendar's dropdown list should close.

Avalonia version

11.0.10, 11.1.0-beta2, master 5e323b8

OS

No response

Additional context

No response

@MrJul MrJul added the bug label May 15, 2024
@rabbitism
Copy link
Contributor

rabbitism commented May 15, 2024

Since ComboBox implementation utilized internal CompositeDisposable and closing popup upon parent invisible is a common scenario (at least when I was designing Ursa), I hope popup can expose an API for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants