ToastWallet / core

This repo contains the core code for Toast Wallet. It is built for iOS, Android and browser directly from this repository. PC builds are built from the browser version using Electron.
GNU General Public License v2.0
210 stars 80 forks source link

Screen Rotates 90 degrees when program opens #15

Open vertoforce opened 6 years ago

vertoforce commented 6 years ago

This may sound super strange, but on my Yoga 13, when I open this program, the screen literally rotates 90 degrees so I need to tilt my head to even see it.

I've tried running it in compatibility mode and nothing seems to work. It even rotates the screen with screen rotation off.

jorgeyanesdiez commented 6 years ago

Same on my surface pro 3, running Windows 10. Happens with both the appx and the .exe installer versions. It doesn't rotate the screen straight away, it does it when the loading animation (the circle made up of dots) shows up on screen.

jorgeyanesdiez commented 6 years ago

I found this, could be related PhoneGap 90º

It could be caused by this: https://github.com/ToastWallet/core/blob/2b559c025e4d896a0916252089d396aca886102c/plugins/cordova-plugin-screen-orientation/www/screenorientation.js#L44

However, this seems to be a more appropriate reason/fix: https://stackoverflow.com/questions/23673892/how-to-prevent-a-phonegap-application-to-switch-to-landscape-view

The reason Phonegap ignored the in the config.xml file is because my app was in debug mode. once I created a release version it stopped from going to landscape.

In this case it's the opposite, it's going portrait...

RichardAH commented 5 years ago

Can you confirm if this is still happening on current version?

jorgeyanesdiez commented 5 years ago

I just installed the appx (2.5.8) and yes, it does.

Rotated 90º

Browser version is fine though

Browser

jorgeyanesdiez commented 5 years ago

I looked back at my comment from Feb 16, 2018 and I ended up here. https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-screen-orientation/ I think it must be something related to that. The orientation is probably being fixed by config or code somewhere.