RESOLVED FIXED 253416
Clicks aren't registered in iOS Safari in Wasm game
https://bugs.webkit.org/show_bug.cgi?id=253416
Summary Clicks aren't registered in iOS Safari in Wasm game
eri0onpm
Reported 2023-03-05 14:38:48 PST
https://ericoporto.github.io/agsjs/fix/ The game in this link register touches correctly in Google Chrome on Android and also Firefox on Android, but not on Safari on iOS. There is no exceptions or errors registered in the Safari console. As far as I can tell the touch events should work the same in iOS Safari.
Attachments
Radar WebKit Bug Importer
Comment 1 2023-03-12 15:39:14 PDT
eri0onpm
Comment 2 2023-03-18 03:18:56 PDT
I am using regular Emscripten methods, but I know their CI only tests for Chromium and Firefox, so my guess is there's some incompatibility between that and Safari, or some missing API in Safari. Any help in figuring this out would be greatly appreciated.
eri0onpm
Comment 3 2023-03-18 18:07:08 PDT
Found the issue, Touch.identifier works differently in iOS Safari and there was some internal reliance on how it works on the other devices, os and browsers.
Eknoor
Comment 4 2023-04-10 21:17:01 PDT
Thank you for the update on your findings. Does this report still need to remain open?
Karl Dubost
Comment 5 2023-04-10 21:58:42 PDT
eri0onpm, Are you referring to the code in this script: in https://ericoporto.github.io/agsjs/fix/ags.js I loaded the game on iPad (large) and it's not working at all. > Touch.identifier works differently in iOS Safari In which way? Could you provide a minimal test case? https://w3c.github.io/touch-events/#dom-touch-identifier > An identification number for each touch point. > > When a touch point becomes active, it must be assigned an identifier that is distinct from any other active touch point. While the touch point remains active, all events that refer to it must assign it the same identifier.
eri0onpm
Comment 6 2023-07-30 15:31:26 PDT
sorry, I never saw the last message, but yes, it was fixed on our end, here is the PR that fixed this https://github.com/adventuregamestudio/ags/pull/1955 The touch finger IDs in iOS they always get a new integer number, in Android browsers they work differently, being first finger the number 0, second finger on screen the number 1, and when a finger is removed from screen the next finger will get its ID or whatever is the lower available ID. Both comply with the spec for the Web as the way this is phrased in the spec is mostly "have an unique ID for a finger".
Note You need to log in before you can comment on or make changes to this bug.