Draw dropdowns in the available space

Avoiding to overflow the parent container. Related to #906