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

TextBox in Expandable.Header Captures Space Input #17055

Closed
TosiRikhard opened this issue Sep 18, 2024 · 2 comments
Closed

TextBox in Expandable.Header Captures Space Input #17055

TosiRikhard opened this issue Sep 18, 2024 · 2 comments
Labels

Comments

@TosiRikhard
Copy link

TosiRikhard commented Sep 18, 2024

Description

When placing a TextBox control within an Expandable.Header, the space key input is captured by the Expandable Control. This causes the Expandable control to unexpectedly collapse or uncollapse instead of inserting a space character in the TextBox.

To Reproduce

  1. Create a new Avalonia application
  2. Add an Expandable control to your XAML
  3. Place a TextBox control within the Expandable.Header
  4. Run the application
  5. Click on the TextBox to focus it
  6. Try to type a space character

Expected behavior

The space character should be inserted into the TextBox without affecting the Expandable control's state.

Actual Behavior

The space key input causes the Expandable control to collapse or uncollapse, and no space character is inserted into the TextBox.

Avalonia version

11.1.3

OS

Windows

Additional context

A workaround can been implemented by placing the TextBox inside the Expandable content and binding its value to a TextBlock in the header. However, this is not an ideal solution and complicates the UI structure.
This issue is particularly problematic when trying to provide descriptive names for UI elements that end users can edit. The current behavior significantly hampers usability and creates a counter-intuitive user experience.

@MrJul
Copy link
Member

MrJul commented Sep 18, 2024

Can you please try Avalonia 11.2.0-beta2?
This should have been fixed by #16619.

@TosiRikhard
Copy link
Author

Works great with suggested beta. Thanks.

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