Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

[Android] $.orientation.landscape / $.orientation.portrait return wrong values when switching orientations #12

Description

@mlworks

Currently when Deckard detects an orientation change, it'll run a isLandscape check by dividing window's height and width and compares it to compareRatio. At this moment, the window height and width values are still based on the initial orientation thus incorrectly return isLandscape as true/false when switching orientations.

Upon some testing, it appears using the resize event instead of orientationchange will yield consistent results on Android as the window height and width are correctly calculated.

Tested on Nexus 6P (Chrome) and Galaxy Note 5's Chrome Browser and "Samsung Internet Browser".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions