-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(overlays): do not return focus if application has already moved f…
…ocus manually (#28850) Issue number: resolves #28849 --------- ## What is the current behavior? If the developer tries to set focus to a custom element on overlay dismissal, Ionic will always override that focus. ## What is the new behavior? - If focus is already set by developer during dismissal, then Ionic will not restore focus to previous element ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information In the before video, you can see the text box is focused by developer code when "Mention User" is tapped, which opens the keyboard. Shortly after that, when the bottom sheet fully dismisses, Ionic focuses the button, removing focus from the text box and hiding the keyboard. In the after, Ionic detects that the developer has already focused the text box and does not change that focus. |Before|After| |---|---| |<video src="https://github.com/ionic-team/ionic-framework/assets/2166114/47d55eff-29af-4019-ac3c-00f9fe722ca7"></video>| <video src="https://github.com/ionic-team/ionic-framework/assets/2166114/508ae466-d037-41eb-b518-92338a122b22"></video>|
- Loading branch information
Showing
2 changed files
with
77 additions
and
3 deletions.
There are no files selected for viewing
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