You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(overlays): do not return focus if application has already moved focus 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>|
0 commit comments