Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order in which index entries should be reused is unspecified #11

Closed
luser opened this issue Apr 24, 2015 · 1 comment
Closed

Order in which index entries should be reused is unspecified #11

luser opened this issue Apr 24, 2015 · 1 comment

Comments

@luser
Copy link
Contributor

luser commented Apr 24, 2015

Originally filed as https://www.w3.org/Bugs/Public/show_bug.cgi?id=26203:

Brady Eidson 2014-06-25 18:55:54 UTC

Order in which index entries should be reused is unspecified.

The description of the index property on Gamepad states:
"if a gamepad is disconnected, and subsequently the same or a different gamepad is then connected, index entries must be reused."

So if I have 2 gamepads, then disconnect index 0, then connect a new gamepad, it should reuse index 0.

If I have 3 gamepads, then disconnect index 1, then connect a new gamepad, it should reuse index 1.

But what if I have 3 gamepads, disconnect index 1, then disconnect index 0.
Then connect a new gamepad.

Which index should it reuse? 0, which is the lowest unused index? Or 1, because it was the first disconnected index?

I would say 0, and suggest the spec state something like:
"if a gamepad is disconnected, and subsequently the same or a different gamepad is then connected, the lowest previously used index must be reused."

[reply] [−] Comment 1 Ted Mielczarek [:ted] 2014-06-25 19:02:28 UTC

Your suggestion is what Firefox implements (and I'm fairly certain Chrome), and is certainly the intended behavior.

@sgraham
Copy link
Contributor

sgraham commented Feb 14, 2018

Thanks @beidson, used your proposed language in e7b58b8.

@sgraham sgraham closed this as completed Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants