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

Fix focus issues with ContentDialog #931

Merged
merged 3 commits into from
Feb 5, 2024

Conversation

jackBonadies
Copy link
Contributor

Pull request type

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

Currently, ContentDialog has 2 focus issues (that can be observed in the wpfui gallery). 1. On launching ContentDialog focus is not on content dialog, it stays on the background controls. 2. One can tab off the ContentDialog controls onto background controls.

Issue Number: N/A

What is the new behavior?

It now behaves like WinUI 3 - i.e. it has focus starting on the ContentDialog and one cannot tab off ContentDialog (it cycles within the dialog). Note that there was an attempt to Focus() dialog on load, but since ContentDialog was not set to focusable that call returned false (and did nothing). This is now fixed.

Other information

This is just a candidate solution. If one does not want ContentDialog set to Focusable for whatever reason, then they can write a routine to select the first focusable child.

@pomianowski
Copy link
Member

It looks almost too elegantly simple, thanks for your support @jackBonadies

@pomianowski pomianowski merged commit 4c4e6a9 into lepoco:development Feb 5, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants