This is happening in Chrome browser for Android, in hexdocs.pm
Which URL precisely? And can you please post a screenshot? :)
@josevalim I suppose any URL would work, for example, https://hexdocs.pm/ecto. I was unable to reproduce it in any of the desktop browsers, but it reproduces on Android in Chrome 58.0.3029, Firefox 53 and Opera Mini 25.0.2254. Unfortunately, I don't have any Apple devices to confirm that the bug is present there as well.
It should not be related to responsive layout because changing the viewport size on desktop makes no effect. The only thing that comes in mind is touch events but I don't remember any explicit usage of them in ex_doc.
UPD: it also seems to be not reproducible in Chrome device emulator.
It works fine on iOS (10.3.2) if that's helpful.
Correct. It happens in any URL, in landscape and portrait view
And a screenshot wouldnt work, as it dissapears instantly as if you were closing thr side panel
Might be worth taking a photo of a live phone then, at least everyone would be able to see it?
The change is instant. if you want a before is with the sidebar open, and the after is with no side bar.
you can only see that recording a screencast.
Browsers running on android will trigger the resize event when the on-screen keyboard pops up. Since the initialize function in assets/js/sidebar.js adds a listener on window resize, the sidebar will be closed every time a resize happens.
I guess the solution would be to either remove the event listener on window resize, or only close the sidebar if the width changed (ignoring the height).
Huge thanks to everyone. I suppose that #742 should fix the issue.
Thank you @nscyclone for fixing this issue.
Amazing work!
@josevalim I think we need to make a new release as this is a very annoying bug if you are checking docs in a mobile
/cc @ericmj
Most helpful comment
Huge thanks to everyone. I suppose that #742 should fix the issue.