Choices: Dropdowns can not be placed in an overflow

Created on 29 Jan 2019  路  1Comment  路  Source: Choices-js/Choices

Problem: When dropdowns are placed in an overflow hidden container, dropdown templates may be clipped by bottom of the parent container.

Expected Behavior: Dropdown templates should breakout of parent containers and extend below to the extent of the browser window, or relocate above when not possible.

Solution: Dropdown elements should be placed in the DOM before the closing 'body' tag and absolutely positioned at the origin element with a high z-index.

>All comments

This was a design decision when creating Choices. Adding the logic for determining position adds complexity and increases the size of the module. If you are in this situation, I would look at removing the overflow hidden from containing element instead of breaking out of it.

Was this page helpful?
0 / 5 - 0 ratings