Skip to content

AutoCompleteBox GotFocus ArgumentOutOfRangeException #21231

Description

@geskill

Describe the bug

I get a ArgumentOutOfRangeException in the AutoCompleteBox with this GotFocus code.
I don't know if this this is an expected behavior, but in Version 11.3.13 this worked fine:

        private void AutoCompleteBox_GotFocus( object? sender, Avalonia.Input.FocusChangedEventArgs e ) {
            if ( sender is AutoCompleteBox autoCompleteBox ) {
                autoCompleteBox.IsDropDownOpen = true;
            }
        }

To Reproduce

Here is a mini sample project.

AvaloniaArgumentOutOfRangeException.zip

Start typing "Loc
Select "Location A" and the app runs into the ArgumentOutOfRangeException.

Expected behavior

No response

Avalonia version

12.0.1

OS

Windows

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions