-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suppresses auto-focus under certain conditions (#8393)
* Suppresses auto-focus under certain conditions In multi-window XAML Islands apps that share a single UI thread for each window, focusing a view on a blurred window causes that window to get focus. Generally speaking, focusing a window should be explicit, and it's likely very rare that you would want a view getting focus to cause the entire window to get focus. This manifests as problematic in two ways: 1. If you have a flyout shown and the flyout gets dismissed because you switch to another window, the parent window for the flyout would steal focus again when react-native-windows attempts to focus the target element. 2. If you re-render a view with a TextInput with `autoFocus={true}` and the parent window for that TextInput is blurred, the window will steal focus. This change forces the user to first focus the window and update the active XamlRoot via the `XamlUIService::SetXamlRoot` API before a view in the window can get focus. * Change files
- Loading branch information
Showing
7 changed files
with
63 additions
and
4 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/react-native-windows-3f1cdae2-0985-46e8-811f-5bf27d5897e3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "Suppresses auto-focus under certain conditions", | ||
"packageName": "react-native-windows", | ||
"email": "erozell@outlook.com", | ||
"dependentChangeType": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters