-
Notifications
You must be signed in to change notification settings - Fork 47
Require system focus for gamepad user gesture #207
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
base: gh-pages
Are you sure you want to change the base?
Changes from all commits
3488c7c
9c81ec4
cc058cd
3b8d37e
f65d469
6903dc6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -801,8 +801,15 @@ <h3> | |||||||||||||
| <li>Let |navigator:Navigator| be |gamepad|'s [=relevant global | ||||||||||||||
| object=]'s {{Navigator}} object. | ||||||||||||||
| </li> | ||||||||||||||
| <li>Let |document:Document?| be |gamepad|'s [=relevant global | ||||||||||||||
| object=]'s [=associated `Document`=]; otherwise `null`. | ||||||||||||||
| </li> | ||||||||||||||
| <li>If |document| is `null`, abort these steps. | ||||||||||||||
| </li> | ||||||||||||||
| <li>If |navigator|.{{Navigator/[[hasGamepadGesture]]}} is `false` and | ||||||||||||||
| |gamepad| [=contains a gamepad user gesture=]: | ||||||||||||||
| |document| is a [=Document/fully active descendant of a top-level | ||||||||||||||
| traversable with user attention=] and |gamepad| [=contains a gamepad | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we create an alias for "focused"? "A [=Document=] |document| is focused if |document| is a [=Document/fully active descendant of a top-level traversable with user attention=] and |gamepad| [=contains a gamepad user gesture=]:"?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don’t think we should do that, to be honest. If we need the concept of focus, we should link out to HTML (which defines it). |
||||||||||||||
| user gesture=]: | ||||||||||||||
|
Comment on lines
+810
to
+812
|
||||||||||||||
| |document| is a [=Document/fully active descendant of a top-level | |
| traversable with user attention=] and |gamepad| [=contains a gamepad | |
| user gesture=]: | |
| |document| is not `null` and is a [=Document/fully active descendant | |
| of a top-level traversable with user attention=] and |gamepad| | |
| [=contains a gamepad user gesture=]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, yeah... maybe this check should also happen earlier. If you don't have a document anyway, then none of the above really matters, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the document is
nullthen that's exceptional... InvalidStateError?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it doesn't make sense to throw here because we're inside "When the system receives new button or axis input values", if we throw an error there's nothing to catch it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good point. Yes, it should just return gracefully.