Skip to content

Scrollable dropdown menu inside a collapsible #1812

Closed Answered by saadeghi
ritvij14 asked this question in Q&A
Discussion options

You must be logged in to vote

That combination is challenging and here's the issue:

  1. You can't use the Collapse with focus example and put a dropdown inside it because they both work with focus and in a HTML page only one element can be focused at a time. so when we open the collapse using a focus event, it will stay open as long as it's focused and when we open the dropdown inside, it will lose focus and get's closed. that's just a expected CSS behaviour.
  2. You can use Collapse with checkbox for that because you can keep the collapse open using the checkbox value and then you're able to open the dropdown by focusing it. it works but there's another challenge here: collapse and collapse-content have overflow:hidden beca…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@alon-codes
Comment options

Answer selected by saadeghi
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants