You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not looked into the details yet, but this can cause the window to scroll to the top with showModal(), which is annoying if showing/hiding the dialog, and finding yourself at the top of the page.
Quick fix for now...
CSS dialog to use position: fixed, to match the updated default behaviour.
JS needsCentering() to include && computedStyle.position != 'fixed'
JS reposition() to use element.style.top = ((window.innerHeight - element.offsetHeight) / 2) + 'px';
I suspect that might cause other issues, but that's seems to have fixed my immediate problem.
The text was updated successfully, but these errors were encountered:
Looks like
<dialog>
is now usingposition: fixed
... as of Chrome 93?w3c/csswg-drafts#4645
https://www.chromestatus.com/feature/5756963046555648
Not looked into the details yet, but this can cause the window to scroll to the top with
showModal()
, which is annoying if showing/hiding the dialog, and finding yourself at the top of the page.Quick fix for now...
dialog
to useposition: fixed
, to match the updated default behaviour.needsCentering()
to include&& computedStyle.position != 'fixed'
reposition()
to useelement.style.top = ((window.innerHeight - element.offsetHeight) / 2) + 'px';
I suspect that might cause other issues, but that's seems to have fixed my immediate problem.
The text was updated successfully, but these errors were encountered: