foundation-sites icon indicating copy to clipboard operation
foundation-sites copied to clipboard

Dropdown pane: data-allow-overlap=false not respected

Open bwydev opened this issue 7 years ago • 3 comments

If a dropdown pane is larger than the browser window, the pane is not resized to respect window width. (data-allow-overlap=false is default according to docs)

FD 6.4.1

Testing: Resize browser window on CodePen to smaller than the large dropdown pane and refresh: https://codepen.io/bwy/pen/GvJyqJ

bwydev avatar Jul 27 '17 01:07 bwydev

Seems this could be related to explicitly setting the width. Is the explicit width important for you?

Setting data-position="right" data-alignment="bottom" on your medium drop down which should cause overlap is behaving correctly and repositioning it.

In iOS Safari the main div gets resized to allow the large dropdown to fit. so the window becomes scrollable.

In Chrome it behaves as expected and the large dropdown repositions to bottom center and then overlaps the left hand side of the window without resizing the main div so the start of the lines aren't readable.

Both are sort of consistent with the docs but not each other and not ideal but they behave much more nicely without the explicit width

colinmackinlay avatar Jul 27 '17 17:07 colinmackinlay

The widths are explicitly set in settings under "17. Dropdown", i.e.:

$dropdown-sizes: (
  tiny: 100px,
  small: 200px,
  large: 900px,
);

And medium is default at 300px, so works as long as the browser window is wider than 300px. So same issue, just using large at 1000px to demonstrate.

bwydev avatar Jul 27 '17 18:07 bwydev

This is a real bug, probably introduced in the explicit positioning rework. I'll take it.

kball avatar Aug 01 '17 21:08 kball