Skip to content
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

Closed
webcompat-bot opened this issue Apr 29, 2020 · 5 comments
Closed

docs.rsshub.app - desktop site instead of mobile site #52296

webcompat-bot opened this issue Apr 29, 2020 · 5 comments
Labels
browser-fenix engine-gecko The browser uses the Gecko rendering engine priority-normal severity-important A non-core broken piece of functionality, not behaving the way you would expect.
Milestone

Comments

@webcompat-bot
Copy link

webcompat-bot commented Apr 29, 2020

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 screenshotScreenshot
Browser Configuration
  • None

From webcompat.com with ❤️

@webcompat-bot webcompat-bot added the action-needsmoderation The moderation has not yet been completed label Apr 29, 2020
@webcompat-bot webcompat-bot added this to the needstriage milestone Apr 29, 2020
@webcompat-bot webcompat-bot added the browser-fixme This requires manual assignment for the browser name label Apr 29, 2020
@webcompat-bot webcompat-bot changed the title In the moderation queue. docs.rsshub.app - desktop site instead of mobile site Apr 29, 2020
@webcompat-bot webcompat-bot added browser-fenix engine-gecko The browser uses the Gecko rendering engine and removed action-needsmoderation The moderation has not yet been completed browser-fixme This requires manual assignment for the browser name labels Apr 29, 2020
@cipriansv cipriansv added priority-normal severity-important A non-core broken piece of functionality, not behaving the way you would expect. labels Apr 29, 2020
@cipriansv cipriansv modified the milestones: needstriage, needsdiagnosis Apr 29, 2020
@cipriansv
Copy link

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:
Browser / Version: Firefox Preview Nightly 200424 (🦎 77.0a1-20200422093542), Chrome Mobile 81.0.4044.117
Operating System: OnePlus6 (Android 9.0) - 1080 x 2280 pixels (~402 ppi pixel density)

This is the web page displayed in Firefox Preview Nightly:

image

And this is the web page displayed in Chrome:

image

Moving the issue to needsdiagnosis.

@ksy36 ksy36 self-assigned this Apr 29, 2020
@ksy36
Copy link
Contributor

ksy36 commented Apr 29, 2020

Looks like in the initial template the viewport metatag exists:

Screen Shot 2020-04-29 at 5 10 16 PM

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):

Screen Shot 2020-04-29 at 5 15 17 PM

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?

@ksy36 ksy36 modified the milestones: needsdiagnosis, needscontact Apr 29, 2020
@hiikezoe
Copy link

Great analysis!

Chrome handles this differently though, keeping the mobile view despite the missing viewport tag. Seems like Firefox behaviour is correct here.

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.

@ksy36
Copy link
Contributor

ksy36 commented Apr 30, 2020

Thanks @hiikezoe 👍

@softvision-oana-arbuzov
Copy link
Member

The issue has been fixed. Mobile layout is received both on Firefox and Chrome.
image

Tested with:
Browser / Version: Firefox Nightly 200827 (🦎 81.0a1-20200820093209)
Operating System: Samsung Galaxy S6 Edge (Android 7.0) - 1440 x 2560 pixels (~577 ppi pixel density)

@ksy36 ksy36 removed their assignment Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser-fenix engine-gecko The browser uses the Gecko rendering engine priority-normal severity-important A non-core broken piece of functionality, not behaving the way you would expect.
Projects
None yet
Development

No branches or pull requests

5 participants