Bug 1606130 Comment 6 Edit History

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

All the elements here are getting an offset of about 3 css pixels on my machine, which is what's leading to the scrollable container, which doesn't actually exist - and of course gets removed when we clicking outside the dialog closes the dialog.

A simple workaround is to make the dialog's overlay call `preventDefault()` on the mousedown event. But I'm confused where these 3px are coming from - as far as I can tell it's happening to the entire stack of elements from `#dialogOverlay-0` up to `body` and `html` - the latter two having `margin/padding: 0` and `height/width: 100%`. So I don't understand how they can be 3 pixels off to the top of the document.

Emilio, can you enlighten us?
All the elements here are getting an offset of about 3 css pixels on my machine (ie `getBoundingClientRect()` returns an object with top/y `-3.3333282470702125`), which is what's leading to the scrollable container (`window.scrollMaxY` is `3`), which doesn't actually exist - and of course gets removed when we clicking outside the dialog closes the dialog.

A simple workaround is to make the dialog's overlay call `preventDefault()` on the mousedown event. But I'm confused where these 3px are coming from - as far as I can tell it's happening to the entire stack of elements from `#dialogOverlay-0` up to `body` and `html` - the latter two having `margin/padding: 0` and `height/width: 100%`. So I don't understand how they can be 3 pixels off to the top of the document.

Emilio, can you enlighten us?

Back to Bug 1606130 Comment 6