Bug 216861

Summary: When browser is killed/reopened, getGamepads returns objects with "" id and mapping
Product: WebKit Reporter: Justin Uberti <juberti>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: iPhone / iPad   
OS: Other   
Attachments:
Description Flags
Screenshot from STP 113 debugger of Gamepad object none

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)