notorious_beeg icon indicating copy to clipboard operation
notorious_beeg copied to clipboard

[WEB] chrome mobile loses focus after SDL_ShowMessageBox

Open ITotalJustice opened this issue 3 years ago • 0 comments

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

ITotalJustice avatar Sep 06 '22 14:09 ITotalJustice