Closed Bug 1539178 Opened 5 years ago Closed 4 years ago

Increase threshold of gamepad joystick activation

Categories

(Core :: DOM: Device Interfaces, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: tjr, Assigned: daoshengmu)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-needed)

Attachments

(1 file)

As discussed on dev-platform, we would like to increase the threshold of joystick activation so that a slightly off joystick or a user typing or bumping their desk with the gamepad on it does not cause the gamepad to activate and be visible to a webpage.

Blocks: 1643833
Attachment #9168652 - Attachment description: Bug 1539178 - Add a threshold of gamepad axis to avoid gamepads be unintentionally activated. → Bug 1539178 - Add a threshold on gamepad axes to avoid gamepads be unintentionally activated.

If the gamepad is the first time to be seen, we need to check if its axis move value is larger than AXIS_FIRST_INTENT_THRESHOLD_VALUE, then we will let it pass the first intent judgement.

Pushed by dmu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ed7c0b42d735
Add a threshold on gamepad axes to avoid gamepads be unintentionally activated. r=cmartin,baku
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

Hi :daoshengmu

Did you have any particular documentation requirement in mind? Looking at the docs - e.g. https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API this doesn't actually impact the API - it just makes sure that it isn't inadvertently triggered.

If not, I'll just add a release note: https://wiki.developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/81#Gamepad

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: