Skip to content

Width and height incorrect on IOS when orientation changes. #52

@GCheung55

Description

@GCheung55

I believe #24 introduced a bug. I'm testing against Simulated iPhone X.

Below are widths and heights returned from _currentWidth and _currentHeight methods, respectively.

Portrait:
widths: [375, 375, 375]
heights: [635, 635, 812]

Landscape:
widths: [724, 724, 375]
heights: [375, 325, 812]

Going by the logic in _currentWidth and _currentHeight, the smallest value will always be used returned regardless of orientation. E.g. width will always be 375 and height will always be 325.

My meta viewport content looks like:

<meta name="viewport" content="width=device-width, initial-scale=1">

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