Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a resize event might not be fired on iOS Chrome #3067

Open
2 of 11 tasks
eihigh opened this issue Aug 19, 2024 · 5 comments
Open
2 of 11 tasks

a resize event might not be fired on iOS Chrome #3067

eihigh opened this issue Aug 19, 2024 · 5 comments

Comments

@eihigh
Copy link
Contributor

eihigh commented Aug 19, 2024

Ebitengine Version

latest

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

Go Version (go version)

go1.22.6

What steps will reproduce the problem?

Open a wasm binary in this page https://a28924d7.go-wasm-player.pages.dev/

I reproduced only on iOS Chrome.

What is the expected result?

Rendered in the correct aspect ratio

What happens instead?

Shrink a little vertically from the correct aspect ratio.

Anything else you feel useful to add?

There seems to be some cases where the screen resizes without the resize event being fired in mobile browsers.

I fixed this issue with ResizeObserver that captures all resizings. See eihigh/go-wasm-player@320e6e4

@eihigh eihigh added the bug label Aug 19, 2024
@hajimehoshi hajimehoshi added this to the v2.8.0 milestone Aug 19, 2024
@eihigh
Copy link
Contributor Author

eihigh commented Aug 19, 2024

Wrong vs correct.

image image

@hajimehoshi
Copy link
Owner

We need a minimized test case.

@eihigh
Copy link
Contributor Author

eihigh commented Aug 19, 2024

I reproduced in https://issue-3067-resize.pages.dev/ . The code is here https://github.com/eihigh/issue-3067-resize/tree/main

It just opens a wasm player in a new tab. If you open the player (https://issue-3067-resize.pages.dev/play/) directly, it seems to work fine.

@hajimehoshi
Copy link
Owner

I've succeded to reproduce the issue on Chrome on iPhone.

@hajimehoshi
Copy link
Owner

Is this possible to reproduce this on localhost?

@hajimehoshi hajimehoshi changed the title There are some cases where the screen resizes without the resize event being fired in mobile browsers a resize event might not be fired on iOS Chrome Sep 2, 2024
@hajimehoshi hajimehoshi modified the milestones: v2.8.0, v2.9.0 Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants