Open ITotalJustice opened 2 years ago
to reproduce:
EMSCRIPTEN_EVENT_BLUR
SDL_WINDOWEVENT_FOCUS_LOST
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:
SDL_ShowMessageBox does a simple js alert https://github.com/libsdl-org/SDL/blob/00452e47fa022314b4c21af2d4e5b63a53f89b8f/src/video/SDL_video.c#L4591
SDL_ShowMessageBox
sdl basically wraps around emscripten html wapper api https://github.com/libsdl-org/SDL/blob/10e1ef00e29479f3ac0ba4d0bf3e0083fca8b2a0/src/video/emscripten/SDL_emscriptenevents.c#L442.
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
to reproduce:
EMSCRIPTEN_EVENT_BLUR
, sdl gets it and now firesSDL_WINDOWEVENT_FOCUS_LOST
.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:
SDL_ShowMessageBox
does a simple js alert https://github.com/libsdl-org/SDL/blob/00452e47fa022314b4c21af2d4e5b63a53f89b8f/src/video/SDL_video.c#L4591sdl basically wraps around emscripten html wapper api https://github.com/libsdl-org/SDL/blob/10e1ef00e29479f3ac0ba4d0bf3e0083fca8b2a0/src/video/emscripten/SDL_emscriptenevents.c#L442.
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