Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Bug with ons.orientation

  • Hello,

    Android 5 and 6, default Monaca project - Onsen 2.0.3, Cordova 6.2.0, Crosswalk 1.7.2, debug buid.

    Very simple Onsen app:

        <ons-button onclick="alert('isPortrait='+ons.orientation.isPortrait())">Orientation</ons-button>

    This code work correctly with system WebView.
    But when you add Crosswalk to the project you can see bug:
    The first time after the app launch orientation is detected correctly. You can chage orientation again and again and this code work fine.
    Close the app with phone Back button.
    Start the app again.
    Orientation inversed (for portrait reported landscape and vice versa).
    Close the app and remove app from the memory (clear launched apps from Android menu).
    Start the app again - orientation is detected correctly.

    It seems that going to the background invoke some mess for orientation detection.

  • Onsen UI

    @Sergey Hey! Thanks for reporting but could you please open an issue on Github? We prefer bug reports there. This is more for questions and howtos. Thanks!