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

[WEB] chrome mobile loses focus after SDL_ShowMessageBox #91

Open
ITotalJustice opened this issue Sep 6, 2022 · 0 comments
Open

[WEB] chrome mobile loses focus after SDL_ShowMessageBox #91

ITotalJustice opened this issue Sep 6, 2022 · 0 comments

Comments

@ITotalJustice
Copy link
Owner

to reproduce:

  1. open emu in chrome mobile
  2. press loadstate
  3. notice the error because it failed to loadstate (expected)
  4. press okay on the alert
  5. em now fires EMSCRIPTEN_EVENT_BLUR, sdl gets it and now fires SDL_WINDOWEVENT_FOCUS_LOST.
  6. focus is never returned.

i think it only happens in chrome mobile. it works on firefox and safari ios, as well as desktop and desktop browsers.

haven't looked into how emscripten decides to fire a focus event yet. will need to find a fix and pr it.

useful links:


note related to the issue, but the variable name for the event data is wrong, copy and paste error https://github.com/libsdl-org/SDL/blob/10e1ef00e29479f3ac0ba4d0bf3e0083fca8b2a0/src/video/emscripten/SDL_emscriptenevents.c#L432

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant