Bug 216861 - When browser is killed/reopened, getGamepads returns objects with "" id and mapping
Summary: When browser is killed/reopened, getGamepads returns objects with "" id and m...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Safari 14
Hardware: iPhone / iPad Other
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-22 17:55 PDT by Justin Uberti
Modified: 2024-03-29 09:16 PDT (History)
2 users (show)

See Also:


Attachments
Screenshot from STP 113 debugger of Gamepad object (30.84 KB, image/png)
2020-09-22 17:55 PDT, Justin Uberti
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Uberti 2020-09-22 17:55:31 PDT
Created attachment 409431 [details]
Screenshot from STP 113 debugger of Gamepad object

Reproduces on Safari 14.0 GA on iPad and iPhone.

There may be other ways of triggering this, but one that often works is killing the browser from a page that is polling the gamepad. When reopening that page, getGamepads continues reporting a gamepad attached, but the .id and .mapping fields of the Gamepad are now set to "", which confuses the page.

See attached debugger screenshot for details. Previously for this controller .id was reported as "Kishi Extended Gamepad" and .mapping was "standard".
Comment 1 Radar WebKit Bug Importer 2020-09-22 18:46:30 PDT
<rdar://problem/69406014>
Comment 2 Justin Uberti 2020-10-13 17:39:09 PDT
Any updates on this issue? It's pretty common in my use of Safari 14.
Comment 3 Brady Eidson 2024-03-29 09:16:21 PDT
This no longer reproduces (though I'm not sure when it was resolved)