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

internal/ui: a canvas size might not be initialized when ebiten.SetRunnableOnUnfocused(false) in an iframe #3034

Closed
1 of 11 tasks
hajimehoshi opened this issue Jul 4, 2024 · 0 comments
Milestone

Comments

@hajimehoshi
Copy link
Owner

hajimehoshi commented Jul 4, 2024

Ebitengine Version

126af14 and v2.7.6

Operating System

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

Go Version (go version)

go version go1.22.4 darwin/arm64

What steps will reproduce the problem?

Run an HTML5 game with ebiten.SetRunnableOnUnfocused(false) within an iframe.

The prbably easiest way to reproduce this issue is:

  1. Move to the ebitengine directory
  2. Create main.html like this
<iframe src="./index.html"></iframe>
  1. Run wasmserve ./examples/windowsize -runnableonunfocused=false
  2. Open http://localhost:8080/main.html

What is the expected result?

The canvas size is initialized correctly.

What happens instead?

The canvas size is not initialized correctly.

Anything else you feel useful to add?

A game in an iframe doesn't focus the canvas automatically (#1373).

I found this issue on itch.io.

/CC @wasedaigo

@hajimehoshi hajimehoshi added the bug label Jul 4, 2024
@hajimehoshi hajimehoshi added this to the v2.7.7 milestone Jul 4, 2024
@github-actions github-actions bot added the os:js label Jul 4, 2024
hajimehoshi added a commit that referenced this issue Jul 4, 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

1 participant