Topic: Issue with Focus Behavior in Modal with MDB Select Dropdown
Ramognee Technologies pro premium priority asked 4 days ago
I am experiencing an issue with the focus behaviour when interacting with a select dropdown inside a modal that uses MDB Select.
Problem Description:
When the modal is open and the dropdown is active, if the user clicks or holds the select dropdown option, the focus momentarily shifts to the close button (<button type="button" class="btn-close" data-mdb-ripple-init data-mdb-dismiss="modal" aria-label="Close"></button>
) if close is present. Once the user releases the hold on the option, the focus shifts back to the select input.
This issue occurs when the close button is present inside the modal.
And even not also present, then focus get shifted to first input field and again shifted to select.
Expected Behavior:
When the user clicks on the dropdown, the focus should stay on the select dropdown. The presence of the close button inside the modal or not inside modal should not interfere with the focus behaviour. Please assist in resolving this issue or provide guidance on how to prevent the focus shift when the close button is included or not included.
https://mdbootstrap.com/snippets/standard/mdbootramognee-com/6303318
Grzegorz Bujański staff answered 2 days ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 7.2.0
- Device: Laptop
- Browser: Chrome
- OS: Kubuntu
- Provided sample code: No
- Provided link: Yes