Topic: Position of selected item is miscalculated when opening Select in some cases
Expected behavior
When opening a Select, the selected option should be highlighted and always visible. The list should auto-scroll to the selected option's position.
Actual behavior
When using optgroup
together with non-grouped items, the position of the selected option is miscalculated and while the list does scroll, it doesn't scroll enough. Therefore, the selection option is not visible.
From the snippet below, select option "Four", "Five" or "Six" then open the Select again. You would expect the selected option to be highlighted and visible, but it's actually below the viewport.
Resources (screenshots, code snippets etc.)
https://mdbootstrap.com/snippets/standard/kayem79/3138635
I also validated that using non-grouped items along with grouped items is according to the HTML spec. This is the result from the W3 validator:
Michał Duszak staff answered 4 years ago
Hello, thank you for your feedback. We will take a closer look at behaviour of our Select component, as it may affect accessibility. Thank you for reporting this issue, it will help us improving MDB package.
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 3.8.0
- Device: PC
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: Yes