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

Screen lock NotSupportedError for orientation 'landscape', 'portrait' #70

Closed
mkranz opened this issue Aug 4, 2020 · 1 comment · Fixed by #77
Closed

Screen lock NotSupportedError for orientation 'landscape', 'portrait' #70

mkranz opened this issue Aug 4, 2020 · 1 comment · Fixed by #77

Comments

@mkranz
Copy link

mkranz commented Aug 4, 2020

Bug Report

Problem

screen.orientation.lock promise is always rejected with the error NotSupportedError

What is expected to happen?

Promise should be resolved successfully and screenlock occurs

What does actually happen?

Promise is rejected with NotSupportedError

Information

The version prior to the merging of #66 worked as expected.

It appears this line was inadvertently changed such that it never checks if the orientation is supported, but will always fail instead.

Removing the quotes from 'orientation' should fix this issue

Command or Code

Environment, Platform, Device

Tested on iOS 13.5.1 iPad Air 2

Version information

Master

Checklist

  • [x ] I searched for existing GitHub issues
  • [x ] I updated all Cordova tooling to most recent version
  • [x ] I included all the necessary information above
@rushsteve1
Copy link

I am also experiencing this on an iPad running iOS 13.6 and an Android tablet running Android 7.

@timbru31 timbru31 linked a pull request Sep 1, 2020 that will close this issue
5 tasks
@timbru31 timbru31 linked a pull request Jan 22, 2021 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants