Skip to content

Conversation

@nicolaihenriksen
Copy link
Contributor

@nicolaihenriksen nicolaihenriksen commented Feb 21, 2023

Fixes #3095

This PR fixes the keyboard focus traversal associated with the "reveal style" password box. See the associated issue for details.

I updated the Smart Hint demo page to easily test this out.

I also added a UI test to verify the fix as well, however I was only able to get the "forward tabbing" to work. Either I don't know the correct syntax, or XAMLTest does not behave nicely with the special codes for SHIFT/CTRL/ALT modifiers which are mentioned approximately halfway down on this page:

https://learn.microsoft.com/dotnet/api/system.windows.forms.sendkeys.send
(I know this is Windows Forms link, but I assume XAMLTest is just using the same underlying P/Invoke calls?)

I left the "backwards tabbing" in the test, but commented out the assertions with FIXMEs attached. Perhaps you know the correct syntax to get this working?

@nicolaihenriksen nicolaihenriksen added this to the 4.8.0 milestone Feb 21, 2023
@nicolaihenriksen nicolaihenriksen changed the title Fix3095 Fix PasswordBox keyboard focus traversal issue Feb 21, 2023
@nicolaihenriksen nicolaihenriksen changed the title Fix PasswordBox keyboard focus traversal issue WIP: Fix PasswordBox keyboard focus traversal issue Feb 22, 2023
@nicolaihenriksen nicolaihenriksen marked this pull request as draft February 22, 2023 15:18
@nicolaihenriksen nicolaihenriksen changed the title WIP: Fix PasswordBox keyboard focus traversal issue Fix PasswordBox keyboard focus traversal issue Feb 22, 2023
@nicolaihenriksen nicolaihenriksen marked this pull request as ready for review February 22, 2023 15:28
@nicolaihenriksen
Copy link
Contributor Author

@Keboo I changed the UI test code to match the syntax I use in the PR I have on XAMLTest. The test now fails, but it should highlight what I would like to do, and it should pass if the XAMLTest PR is merged and new version pulled in here.

@Keboo Keboo enabled auto-merge (squash) March 2, 2023 05:16
@Keboo Keboo merged commit 5881263 into MaterialDesignInXAML:master Mar 2, 2023
@nicolaihenriksen nicolaihenriksen deleted the fix3095 branch March 2, 2023 13:02
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.

PasswordBox (revealed password) does not show IBeam/caret when tabbing into PasswordBox

2 participants