You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "jcesarmobile (JIRA)" <ji...@apache.org> on 2016/10/11 07:59:22 UTC

[jira] [Closed] (CB-11991) Locking screen orientation causes viewport glitch

     [ https://issues.apache.org/jira/browse/CB-11991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jcesarmobile closed CB-11991.
-----------------------------
    Resolution: Duplicate
      Assignee: jcesarmobile

Yes, it's a duplicate of CB-11423, closing this one

> Locking screen orientation causes viewport glitch
> -------------------------------------------------
>
>                 Key: CB-11991
>                 URL: https://issues.apache.org/jira/browse/CB-11991
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Screen Orientation, Plugin Statusbar
>         Environment: MacOS Sierra, Xcode 8, iPhone 6 iOS 10 simulator and real devices
>            Reporter: Dmitry Chekanov
>            Assignee: jcesarmobile
>
> I develop an app that has both cordova-plugin-screen-orientation and cordova-plugin-statusbar plugins installed.
> When my JS code executes this command:
> {code:javascript}
> screen.lockOrientation('landscape');
> {code}
> the screen rotates and oftentimes turns into something like this: https://drive.google.com/open?id=0B6XpnKFCvexaclBvc09STmhzMUU
> The viewport becomes clipped. I checked in Safari Inspector - the issue is with the viewport, not with CSS - window.innerHeight reports ~100, and window.innerWidth ~1000 (which is obviously not how it should be).
> It doesn't happen all the time. The lighter the page, the harder it is to reproduce.
> I looked into the source code of the StatusBar plugin, and it looks like it does some viewport resizing (there's a function called "resizeWebView") that might cause the described issue. Maybe it gets executed when screen rotates but fails to determine the proper screen dimensions to adjust the viewport.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org