Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Exception when using touchscreen under Firefox #113

Open
dos1 opened this issue Apr 10, 2020 · 1 comment
Open

Exception when using touchscreen under Firefox #113

dos1 opened this issue Apr 10, 2020 · 1 comment

Comments

@dos1
Copy link
Contributor

dos1 commented Apr 10, 2020

Looks like I can consistently cause an exception in SDL2 when touching the canvas on a touchscreen under Firefox:

SyntaxError: Document.querySelector: '' is not a valid selector odglos.js:10184
    __findEventTarget http://localhost:8183/odglos.js:10184
    _emscripten_get_element_css_size http://localhost:8183/odglos.js:10459
    _Emscripten_HandleTouch http://localhost:8183/odglos.wasm:4200498
    dynCall_iiii http://localhost:8183/odglos.wasm:5394586
    dynCall_iiii http://localhost:8183/odglos.js:78237
    touchEventHandlerFunc http://localhost:8183/odglos.js:13894
    jsEventHandler http://localhost:8183/odglos.js:10133
    (Async: EventListener.handleEvent)
    registerOrRemoveHandler http://localhost:8183/odglos.js:10142
    __registerTouchEventCallback http://localhost:8183/odglos.js:13905
    _emscripten_set_touchend_callback_on_thread http://localhost:8183/odglos.js:13914
    _Emscripten_RegisterEventHandlers http://localhost:8183/odglos.wasm:4814647
    _Emscripten_CreateWindow http://localhost:8183/odglos.wasm:4198105
    _SDL_CreateWindow http://localhost:8183/odglos.wasm:2666325
    _sdl_create_display http://localhost:8183/odglos.wasm:3284693
    _al_create_display http://localhost:8183/odglos.wasm:3924375
    _libsuperderpy_init http://localhost:8183/odglos.wasm:2329049
    _main http://localhost:8183/odglos.wasm:4193513
    _main http://localhost:8183/odglos.js:68245

When that happens, all further mouse and touch events cause similar exceptions.

@Daft-Freak
Copy link
Member

Hmm, not getting that exception and it looks like we're passing the right id there https://github.com/emscripten-ports/SDL2/blob/master/src/video/emscripten/SDL_emscriptenevents.c#L444.

Does -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=0 work?

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

No branches or pull requests

2 participants