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

undefined is not an object (evaluating 'screen.orientation.angle') #214

Closed
hakimelek opened this issue Aug 29, 2018 · 4 comments
Closed

Comments

@hakimelek
Copy link

Experiencing the following errors using the Continuity plugin in iPhone/iPad user agents:

TypeError: undefined is not an object (evaluating 'screen.orientation.angle')

Unable to get property 'angle' of undefined or null reference

Uncaught TypeError: Cannot read property 'angle' of undefined

@querymetrics
Copy link

@hakimelek Thanks for the report, i can reproduce the error.

@nicjansma
Copy link

Hi @hakimelek ! @querymetrics has fixed this issue, and will be backporting it soon.

@querymetrics
Copy link

Thanks for mentioning the prefixed screen.msOrientation and screen.mozOrientation, I hadn't included those in my fix but it would help to support more browsers.

iOS doesn't support the Screen Orientation API, but it does support the deprecated window.orientation which will give us the orientation (see https://developer.mozilla.org/en-US/docs/Web/API/Window/orientation).

@nicjansma
Copy link

Fixes via 8548072 and #215

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

Successfully merging a pull request may close this issue.

3 participants