Closed Bug 1538805 Opened 1 year ago Closed 3 months ago

Gamepad only can be shown up in a single tab when visiting to multiple Gamepad tabs.

Categories

(Core :: DOM: Device Interfaces, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: daoshengmu, Assigned: daoshengmu)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

STP:

  1. Open a tab and visit https://html5gamepad.com/
  2. Press buttons or push axes to make this tab recognizes the gamepad is connected.
  3. Open an another tab and visit https://html5gamepad.com/
  4. We can find in the second tab, our gamepad can not be recognized.

I have checked FF on Windows and Mac OS. Both of them have the same result.

Version: 66 Branch → unspecified

I am experiencing this issue after updating, I wanted to include some additional information from debugging/troubleshooting.

This issue was introduced in release 56.0.0
Disabling browser.tabs.remote.autostart fixes the issue.

navigator.getGamepads in the second window seems to return an empty list

(In reply to Zac from comment #1)

I am experiencing this issue after updating, I wanted to include some additional information from debugging/troubleshooting.

This issue was introduced in release 56.0.0
Disabling browser.tabs.remote.autostart fixes the issue.

navigator.getGamepads in the second window seems to return an empty list

Good to know! I guess we need to handle the case of multiple content processes.

Priority: -- → P3

https://treeherder.mozilla.org/#/jobs?repo=try&revision=b8dabcef05394a363e2daafc113a3c61490b4ffc try looks good now and confirmed my local patch fixes this issue. Once I am done with rebasing, we can start to review.

Attachment #9147468 - Attachment description: Bug 1538805 - Send GamepadAdded events to the coming GamepadEventChannels. → Bug 1538805 - Send GamepadAdded events to the later GamepadEventChannels.
Assignee: nobody → dmu
Priority: P3 → P1
Type: enhancement → defect

The original issue was happened when only sending GamepadAdded events to the first GamepadEventChannel. That makes the later content processes would not have the existing gamepad objects. Therefore, I think we should send extra GamepadAdded events for the later GamepadEventChannels.

Pushed by dmu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/df539e0d6851
Send GamepadAdded events to the later GamepadEventChannels. r=baku
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
Blocks: 1643833
You need to log in before you can comment on or make changes to this bug.