-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs.rsshub.app - desktop site instead of mobile site #52296
Comments
Thanks for the report. I was indeed able to reproduce the issue. I receive the desktop version of the site in Firefox Preview Nightly. Tested with: This is the web page displayed in Firefox Preview Nightly: And this is the web page displayed in Chrome: Moving the issue to needsdiagnosis. |
Looks like in the initial template the viewport metatag exists: But it gets removed along with some other tags later, in this function: function Ye(e, t) {
if (t && Object(He.a) (t).forEach(function (e) {
document.head.removeChild(e)
}), e) return e.map(function (e) {
var t = document.createElement('meta');
return Object.keys(e).forEach(function (l) {
t.setAttribute(l, e[l])
}),
document.head.appendChild(t),
t
})
} Not sure what is the intention here, but can see that some of the tags are inserted back, and some aren't (viewport is not inserted back): This explains why the site loads as mobile at first, but switches to desktop since there is no viewport tag for the media queries. Chrome handles this differently though, keeping the mobile view despite the missing viewport tag. Seems like Firefox behaviour is correct here, but maybe @hiikezoe can comment on this? |
Great analysis!
Yeah, this is a bug in Chrome. https://bugs.chromium.org/p/chromium/issues/detail?id=986674 Probably the author of the site accidentally removes the meta viewport tag and have never noticed it since Chrome does render as if there is the meta viewport tag. We should contact the site author to stop doing it. |
Thanks @hiikezoe 👍 |
URL: https://docs.rsshub.app/
Browser / Version: Firefox Mobile 77.0
Operating System: Android
Tested Another Browser: Yes Chrome
Problem type: Desktop site instead of mobile site
Description: Desktop site instead of mobile site
Steps to Reproduce:
Always revert to desktop when finishes loading. It work on Firefox for Android and any chrome based browsers.
View the screenshot
Browser Configuration
From webcompat.com with ❤️
The text was updated successfully, but these errors were encountered: