web-bugs icon indicating copy to clipboard operation
web-bugs copied to clipboard

gyrosco.pe - site is not usable

Open webcompat-bot opened this issue 8 years ago • 9 comments

URL: https://gyrosco.pe/forgot/

Browser / Version: Firefox Mobile 63.0 Operating System: Android 8.0.0 Tested Another Browser: No

Problem type: Site is not usable Description: can't scroll Steps to Reproduce: Just opened the website

From webcompat.com with ❤️

webcompat-bot avatar Jul 12 '18 15:07 webcompat-bot

Thanks for the report, I was able to reproduce the issue.

I have tested on: Browser / Version: Firefox Mobile Nightly 63.0a1 (2018-07-12) and Chrome 67 Operating System: LG G5 (Android 7.0) 1440 x 2560 pixels (~554 ppi pixel density)

gyroscope

lobontiumira avatar Jul 13 '18 06:07 lobontiumira

Looks like the old trick, overflow-x: scroll; does not work here. Neither changing the UA string:

image

Tested on LG G5 (Android 7.0) 1440 x 2560 pixels (~554 ppi pixel density) and Nightly 63.

What do you think, @wisniewskit ?

This seems to be a combination of two meta-viewport interop issues.

Firstly, Firefox is choosing a "default width" of 980px on my phone (even for empty documents with just an HTML tag). Chrome chooses 360px. As a result, Firefox will zoom in on the content, while Chrome will not. I've filed bz1476995 just in case this is a different interop issue from the ones we already have on file.

Secondly, Firefox will not allow the user to pan around the document, due to them using user-scalable=0. It's unclear why it breaks panning here, so I've filed bz1477007 to figure that out.

To be honest, I think they can just drop their meta-viewport tags altogether, since the page seems to look the same for me in Chrome and Firefox without them, and I believe Safari no longer uses them either.

If that's not doable, I've also found a simple JS-based workaround that improves the situation on Firefox:

if (navigator.userAgent.includes("Firefox") &&
    navigator.userAgent.includes("Android")) {
  // Work around Firefox meta viewport interop issues
  // (see https://webcompat.com/issues/17714 for details)
  document.addEventListener("DOMContentLoaded", function() {
    document.documentElement.style.width = screen.width + "px";
    document.documentElement.style.height =
      (document.documentElement.offsetHeight + 1) + "px";
  });
}

Of course I'm not one to suggest UA-based hacks like this lightly, but this seems safe enough. It does cause Firefox to let the user pan around a much larger document than necessary, but at least they can, and the layout otherwise seems similar enough to Chrome otherwise (with some extra margin-like space around the content).

But perhaps we should just wait on the meta-viewport bug reports for a bit first, before suggesting any workarounds... @miketaylr, what do you think?

wisniewskit avatar Jul 19 '18 17:07 wisniewskit

But perhaps we should just wait on the meta-viewport bug reports for a bit first, before suggesting any workarounds... @miketaylr, what do you think?

I think given the relative popularity of this site, https://www.alexa.com/siteinfo/gyrosco.pe, it's probably OK to wait on getting viewport stuff fixed (hopefully in the next 6 months or so). But, if someone wants to do some proactive outreach here, be my guest. :)

miketaylr avatar Jul 19 '18 17:07 miketaylr

Pinging them to see if they can put in a fix for us. [email protected]

adamopenweb avatar Jul 19 '18 19:07 adamopenweb

This is because the site is reporting width of 980px, which is treated as a desktop size. It should properly reflect the width of the screen (360 or 400 or something in that range) and then it will render correctly to fill that size

This seems like a bug with the browser and not the Gyroscope site?

aprilzero avatar Jul 19 '18 19:07 aprilzero

@aprilzero, yes, it's an interop issue, as I noted above. But there are potential work-arounds for the time-being, if Gyroscope wants to try them (it would be interesting to know if the meta-viewport tags are even necessary on the page, for instance, as Chrome and Firefox both seem to render as expected without them in my local testing).

wisniewskit avatar Jul 19 '18 19:07 wisniewskit

The inability to pan around the page has been fixed for Firefox 63 (the beta is currently panning).

I also think we may have deduced why the page isn't scaling properly; it's because the page is ultimately settingwidth=max-device-width in the meta viewport tag, which is an unknown/invalid value, and Firefox and Chrome differ in how they interpret it (still being investigated in bz1476995).

wisniewskit avatar Sep 14 '18 16:09 wisniewskit

After retesting the issue I confirm that the issue has been fixed.

scroll

Tested with: Browser / Version: Firefox Nightly 68.0a1 (2019-06-25), Firefox Fenix (Preview) 1.0.1926 Operating System: Huawei P10 (Android 8.0) - 1080 x 1920 pixels (~432 ppi pixel density)

cipriansv avatar Jun 27 '19 12:06 cipriansv