Skip to content

enhance: enable focus for custom action edit controls #1478

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

Conversation

Natan-Gorecki
Copy link

Description

This PR aims to improve keyboard usability and streamline interactions:

  1. For keyboard users, selecting and typing previously required an extra click on the input field. With this change, users can start typing immediately after the UI is shown.
  2. It allows seamless navigation between input fields using the Tab key.

Key changes

  • Added an OnLoaded event to automatically focus the first focusable input (either a TextBox or CheckBox) when the view is loaded.
  • Removed IsTabStop from SelectableTextBlock. It can still be manually selected with a double click if needed.
  • Replaced ListBox with ItemsControl to properly handle focus and tab navigation for editable controls.
@Natan-Gorecki Natan-Gorecki changed the title enhance: enable focus for custom action edits Jun 30, 2025
@love-linger love-linger merged commit 81da026 into sourcegit-scm:develop Jul 1, 2025
love-linger added a commit that referenced this pull request Jul 1, 2025
- Style for `ContentPresenter` in `ItemsControl.Styles` also overrides the default style of TextBox
- Use simple for-each-loop instead of Linq expr

Signed-off-by: leo <longshuang@msn.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants