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: Popover focus trap breaks usage of material input fields which are rendered outside of the popover #25593

Closed
4 of 7 tasks
digaus opened this issue Jul 8, 2022 · 5 comments
Labels

Comments

@digaus
Copy link

digaus commented Jul 8, 2022

Prerequisites

Ionic Framework Version

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

Current Behavior

Cannot focus the input inside mat-select popover which is placed inside an Ionic Popover.

Reason is this change: fff4aec#diff-e6fe3d2c2375aaff02644f8767f36a3c49825d333f9764644871b0541a95b296R150

Since the input is rendered inside the cdk overlay it is outside of the popover and will be caught by the focus trap.

image

Expected Behavior

Being able to focus inputs outside the popover element if they are on top of the backdrop.

Steps to Reproduce

Add an input to the mat-select inside a popover

Code Reproduction URL

No response

Ionic Info

Am not using the Ionic CLI, only "@ionic/angular": "6.1.12"

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Jul 8, 2022
@digaus
Copy link
Author

digaus commented Jul 8, 2022

Nevermind, I can just add ion-disable-focus-trap

@digaus digaus closed this as completed Jul 8, 2022
@digaus
Copy link
Author

digaus commented Jul 8, 2022

Reopen because it is not documented anywhere but in code:

https://github.com/ionic-team/ionic-framework/blob/main/core/src/utils/overlays.ts#L151

Also maybe it should be implmented better and also check if the element which is focused is outside the popover but has a higher z-index

@digaus digaus reopened this Jul 8, 2022
@liamdebeasi liamdebeasi self-assigned this Jul 8, 2022
@liamdebeasi
Copy link
Contributor

Thanks for the issue. I am going to close this as a duplicate of #24646.

You can use ion-disable-focus-trap, but it is a private API and not subject to the normal breaking change rules so use with caution.

@liamdebeasi liamdebeasi closed this as not planned Won't fix, can't repro, duplicate, stale Jul 8, 2022
@liamdebeasi liamdebeasi removed their assignment Jul 8, 2022
@digaus
Copy link
Author

digaus commented Jul 8, 2022

Oh sorry somehow missed that issue

@ionitron-bot
Copy link

ionitron-bot bot commented Aug 7, 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 Aug 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants