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

Angle not consistently implemented #247

Closed
marcoscaceres opened this issue Apr 11, 2023 · 3 comments · Fixed by #248
Closed

Angle not consistently implemented #247

marcoscaceres opened this issue Apr 11, 2023 · 3 comments · Fixed by #248

Comments

@marcoscaceres
Copy link
Member

marcoscaceres commented Apr 11, 2023

Over on WebKit, we got a bug report that .angle (and .type) are not reported in an interoperable manner.

Using https://krpano.com/ios/bugs/ios164-screen-orientation/ and turning the device clockwise (there are helpful screenshots there too).

@karlcow did some testing and found:

Firefox Nightly 113 Android 13
screen.orientation.angle: 270
screen.orientation.type: landscape-primary

Chrome Canary 113 Android 13
screen.orientation.angle: 270
screen.orientation.type: landscape-secondary

Safari 16.4 iOS 16.4
screen.orientation.angle: 90
screen.orientation.type: landscape-primary

The spec and the tests agree with Webkit, but we may have a web interop issue at hand.

Should we change the spec to use counter clockwise values instead?

@makotokato, wdyt? It would be great if Firefox also reported "landscape-secondary" in this case.

@makotokato
Copy link

@makotokato, wdyt? It would be great if Firefox also reported "landscape-secondary" in this case.

I guess that this depends on Android version. (Android 11+ has a lot of changes for window manager of Android, so it seems to be incorrect on some device). I will fix it.

@marcoscaceres
Copy link
Member Author

Ok, I guess I should flip the order for the .angles also to match Android in this case. That should also remove some weirdness from the spec, where it could return either 90 or 270.

@marcoscaceres
Copy link
Member Author

Ok, sent a PR: #248 ... other folks watching this, can you please also take a look to make sure everything is right?

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

Successfully merging a pull request may close this issue.

2 participants