-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Open
Labels
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
When using collapse="condense"
on an ion-header inside a modal, the focus trapping functionality of the modal stops working, and tabbing results in focus being placed on elements outside the modal.
Once a modal with a collapsible title is opened, it seems like the focus trapping then stops working all together, even for other instances of modal that do not use collapse title.
The bug only happens in Chromium-based browsers.
Expected Behavior
Focus trapping functionality should be maintained even with collapsible titles.
Steps to Reproduce
- In a Chromium browser, go to https://stackblitz.com/edit/n35ryw68
- Press 'Fixed Title Modal' button to open modal, and press Tab three times to verify that focus cycles between 'Cancel' and 'Confirm' inside the modal.
- Close the modal and press 'Collapsible Title Modal' button, then press Tab three times
- See that focus is now outside the modal, most likely on the first browser tab
Code Reproduction URL
https://stackblitz.com/edit/n35ryw68
Ionic Info
Stackblitz info:
Ionic:
Ionic CLI : 5.4.16
Utility:
cordova-res : not installed
native-run : not installed
System:
NodeJS : v20.19.1
npm : 10.8.2
OS : Linux 5.0
Additional Information
No response