Open atticoder opened 3 years ago
I now tested this in Windows Sandbox with fresh installs of Chrome, Edge and Firefox and with all of the browsers the #documentTop button left position is not updated when browser window is resized.
However, as bizarre as it sounds, when cookies are disabled (not enabled), then the button starts to position it in bottom right corner when window is resized. My wild guess is that is because night mode button and menu use cookies and if their javascript fails and raises exception (because cookies are disabled), some CSS is left unprocessed and that unprocessed CSS somehow blocks #documentTop button functionality. It is just a side effect. But as I said I'm just guessing as I have not much knowledge about inner working of the JS/CSS/DOM here.
I have noticed this too in testing. I wasn't sure if it was a bug, since the average user isn't changing their browser window. Although it reminds me that I wondered why the position of that button was being set with JS at all. Why isn't it just set with CSS position:absolute; bottom:1rem; right: 1rem
(or whatever)?
I notice it a lot when I change the orientation on my iPad. A simple browser refresh moves the button to the correct location.
Also, I have noticed on my iPhone that the button does not appear at all until you scroll to the bottom of the page or post. Is that by design?
Not a big issue but with Edge and Firefox (Windows) the left position of the button remains where it was placed when document was created, only top position will update when window is resized. With Chrome it works OK.