Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: overlay element shouldn't be focused upon presenting when descendant already focused #24127

Closed
5 of 6 tasks
MarkChrisLevy opened this issue Oct 28, 2021 · 5 comments · Fixed by #25481
Closed
5 of 6 tasks
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@MarkChrisLevy
Copy link
Contributor

MarkChrisLevy commented Oct 28, 2021

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

When overlay is set to be closed by Escape key, overlay element is always focused in present() method, even if its descendant is already focused.

Expected Behavior

When overlay's descendant is already focused do not call focus on overlay's element.

Steps to Reproduce

  1. Create a component, that will be opened within modal
  2. Create render() and add ion-input
  3. Add componentDidLoad or listener for ionViewDidEnter and focus ion-input

Input will be focused for a moment, but will be blured just after that as the focus is shifted to overlay's element.

Code Reproduction URL

No response

Ionic Info

No response

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Oct 28, 2021
@MarkChrisLevy MarkChrisLevy changed the title bug: overlay shouldn't be focused when descendant already focused bug: overlay element shouldn't be focused upon presenting when descendant already focused Oct 28, 2021
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Nov 1, 2021
@ionitron-bot ionitron-bot bot removed the triage label Nov 1, 2021
@MarkChrisLevy
Copy link
Contributor Author

Hi @liamdebeasi, can you look at it again pls?

@liamdebeasi
Copy link
Contributor

liamdebeasi commented Jun 15, 2022

Can you give this dev build a try and let me know if it resolves the issue? (It's the same fix as what you previously provided)

6.1.11-dev.11655322886.1b2a1a66

@MarkChrisLevy
Copy link
Contributor Author

Yes, it is working as expected. Thanks!

liamdebeasi added a commit that referenced this issue Jun 16, 2022
@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #25481, and a fix will be available in an upcoming release of Ionic Framework.

@ionitron-bot
Copy link

ionitron-bot bot commented Jul 16, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jul 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants