playcanvas / playcanvas/engine

resizeCanvas() doesn't always work correctly

Open
#1,853 34 comments 0 reactions 1 assignee View on GitHub

@slimbuck is already working on this.

Since Feb 3, 2020.

Dominant language
JavaScript
Stars
16.8k
Forks
2k
Avg merge
4h 32m
Merged PRs (30d)
222

Description

Description

We are facing a problem when we change the orientation of the mobile device on iOS in Safari - from portrait mode to landscape mode. All the contents of the applications squeezes randomly.
We have studied this issue and we realized that the function resizeCanvas() doesn't always work correctly after turning the screen. It seems that the function/resize triggers before Safari swaps height and width. We thought that maybe we could solve this issue by triggering the function ourselves after some timeout.
Is it possible to run resizeCanvas() in the namespace of user scripts?
As I understand this is also a known issue. Are there any solutions available?

URL: https://toyota.3dconfiguration.com/
Video: Video with bug
Device: iPhone X
Browser: Safari 12.4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.