Browse Source
* fix(input): fix AccessKeyHandler when no descendant control has focus - Update IsFocusWithinOwner to use routed event's Source instead of re-querying KeyboardDevice.Instance.FocusedElement - Allow access keys (Alt/mnemonics) to work immediately after Window opens when FocusedElement is null or owner itself - Update shared test helpers in AccessKeyHandlerTests to populate event Source Fixes #21806 * fix(input): address review feedback on AccessKeyHandler focus fix - Type IsFocusWithinOwner's owner parameter as InputElement (matching _owner) and drop the now-redundant `is Visual` check - Fix indentation in IsFocusWithinOwner - Add Should_Raise_AccessKey_When_Focus_Is_On_Descendant, covering the IsVisualAncestorOf branch by raising KeyDown/KeyUp on a descendant control instead of the owner - Revert the no-op Source assignment in the KeyDown/KeyUp test helpers - Shorten the comment in Should_Raise_Key_Events_For_Registered_Access_Key --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net>pull/21936/head
committed by
GitHub
2 changed files with 105 additions and 14 deletions
Loading…
Reference in new issue