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

Invalid viewport values on Android in portrait mode #630

Open
ClementCariou opened this issue Aug 24, 2021 · 0 comments
Open

Invalid viewport values on Android in portrait mode #630

ClementCariou opened this issue Aug 24, 2021 · 0 comments

Comments

@ClementCariou
Copy link

Hello, I found a problem with viewport values on the Chrome 92 Android browser in portrait mode.

const regl = require("regl")();
const ctx = regl({});
ctx(({viewportWidth, viewportHeight}) => {
	console.log(viewportWidth / viewportHeight);
	console.log(window.innerWidth / window.innerHeight);
});
Device Orientation Viewport ratio Window ratio
Destop Landscape 1.9814 1.9814
Desktop responsive mode Portrait 0.5632 0.5632
Desktop responsive mode Landscape 1.7739 1.7739
Android Honor 8x Portrait ⚠️0.7177⚠️ 0.5174
Android Honor 8x Landscape 2.7222 2.7222

1 / 1.7739 = 0.5174 not 0.7177

I didn't investigate the problem further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant