title: Firefox 56+ breaks Gamepad API across multiple windows/tabs
body: <h2>Firefox 56+ breaks Gamepad API across multiple windows/tabs</h2>
  
  <p>The application I am working on uses the Gamepad API to allow xbox controllers to be used to control video producing cameras. It supports multiple windows/tabs.</p>
  
  <p>Everything worked great, but after upgrading from Firefox version 52 to 65 the controllers stopped working correctly when multiple pages were open. The update is necessary for video stability, so downgrading is not an option.</p>
  
  <p>Worst case will update with the fixed Vesrion if Mozilla fixes the issue.</p>
  
  <hr>
  
  <p>How to reproduce:<br>
  Running windows open Firefox version 56+  </p>
  
  <ol>
  <li>Open <a href="https://html5gamepad.com/" rel="nofollow noreferrer">https://html5gamepad.com/</a>  </li>
  <li>Connect a xbox controller (maybe any gamepad)  </li>
  </ol>
  
  <p>Observe that the controller is detected and that input on the gamepad is shown in the tester.</p>
  
  <ol start="3">
  <li>Open a second window and navigate to <a href="https://html5gamepad.com/" rel="nofollow noreferrer">https://html5gamepad.com/</a></li>
  </ol>
  
  <p>Observe the at the controller is not detected
  Expected: The controller should be detected and inout should be shown in the tester. </p>
  
  <p>If you downgrade below 56 or disable multiprocess using <code>browser.tabs.remote.autostart</code> this issue is not seen.</p>
  
  <hr>
  
  <p>What I do know / have tried:</p>
  
  <ul>
  <li>Have narrowed down the issue to Firefox version 56.0.0</li>
  <li>Can reproduce the issue consistently with <a href="https://html5gamepad.com/" rel="nofollow noreferrer">https://html5gamepad.com/</a></li>
  <li>Can not reproduce with Chrome or Firefox 52</li>
  <li>Turning off <code>browser.tabs.remote.autostart</code> does remedy the issue, but again, this is necessary for video stability and overall performance.</li>
  <li><code>navigator.getGamepads</code> in the second window seems to return an empty list</li>
  <li>Tracking ff issue
  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1538805" rel="nofollow noreferrer">https://bugzilla.mozilla.org/show_bug.cgi?id=1538805</a></li>
  <li>and ff issue <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1529850" rel="nofollow noreferrer">https://bugzilla.mozilla.org/show_bug.cgi?id=1529850</a></li>
  <li>The issue is one per website</li>
  </ul>
  
  <hr>
  
  <p>Before this is marked as a duplicate. I know this is a similar question as <a href="https://stackoverflow.com/questions/54154170/is-there-a-way-to-use-the-html5-gamepad-api-with-multiple-windows-or-tabs-in-fir">Is there a way to use the HTML5 Gamepad API with multiple windows or tabs in Firefox?</a> but there has been no movement on that issue and it was very specific.</p>
  
  <hr>
  
  <p>TLDR: FF v56+ with multiprocessing enabled breaks the Gamepad API when used in multiple windows. Any workarounds or fixes? </p>