Bug 1826622 Comment 8 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Andrew McCreight [:mccr8] from comment #4)
> On second thought, looking at the test case it has things like `style="margin-top: -50px` so I suspect that this is more of a CSS issue than a DOM issue.

I don't think there's any specific CSS issue here; that `margin-top` is just changing the position of the `input` element.

We anchor the datalist autocomplete-popup-menu to its spawning-element's position, and it seems that "works" even if the element is offscreen, as happens to be the case here. That's maybe worth avoiding, as Masayuki suggests.

(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900)(still sick) from comment #7)
> It seems that popups should be opened at most the content area to avoid overlapping with any chrome UI.

Agreed. FWIW it seems like we do seem to have a version of this constraint for `<select>` menu-popups (slightly different from the pOC here), under some configurations -- specifically for Wayland-*disabled* Linux environments (may require environmental variable `MOZ_ENABLE_WAYLAND=0` if you have Wayland as your window manager).  In constrast: if I have Wayland enabled, then the select menu popup can similarly overlap the Firefox UI (and even extend outside the window on both sides).

(The datalist autocomplete-popups seem to overlap Firefox UI regardless of whether Wayland is enabled.)
(In reply to Andrew McCreight [:mccr8] from comment #4)
> On second thought, looking at the test case it has things like `style="margin-top: -50px` so I suspect that this is more of a CSS issue than a DOM issue.

I don't think there's any specific CSS issue here; that `margin-top` is just changing the position of the `input` element.

We anchor the datalist autocomplete-popup-menu to its spawning-element's position, and it seems that "works" even if the element is offscreen, as happens to be the case here. That's maybe worth avoiding, as Masayuki suggests.

(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900)(still sick) from comment #7)
> It seems that popups should be opened at most the content area to avoid overlapping with any chrome UI.

Agreed. FWIW it seems like we do seem to have a version of this constraint for `<select>` menu-popups (slightly different from the pOC here), under some configurations -- specifically for Wayland-*disabled* Linux environments (may require environmental variable `MOZ_ENABLE_WAYLAND=0` if you have Wayland as your window manager).  In constrast: if I have Wayland enabled, then the select menu popup can similarly overlap the Firefox UI (and even extend outside the window on both sides).

(The datalist autocomplete-popups seem to be allowed to escape the content area & overlap Firefox UI regardless of whether Wayland is enabled.)

Back to Bug 1826622 Comment 8