Skip to content

Wrong viewport on web+mobile #338

@asny

Description

@asny

Open this example in a browser on mobile and see that the green line is not going from top left corner to bottom right corner of the browser viewport.

The problem is that Window::innerWidth() used here includes the browser header and similar. Same for height. It's only a problem on mobile though. It seems like visualViewport might be correct, but that's not exposed by the web_sys crate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions