WebView produces incorrect screen.height, window.innerHeight values

I did only the briefest of testing using your test app, but editing ~/.cache/org.myorg/webview-screensize/.mozilla/prefs.js and changing the layout.css.devPixelsPerPx value I was able to persuade GitHub to switch between mobile and desktop mode (on a 10 III, a value of 1 gave desktop mode, while a value of 3 gave mobile mode). I’m not saying this is where your problem lies, but maybe it’s an avenue to explore.

Since the browser is working correctly, you could compare the value with that found in ~/.local/share/org.sailfishos/browser/.mozilla/prefs.js.

1 Like