Closed Bug 855471 Opened 9 years ago Closed 9 years ago

Transfer focus to LayerView if we get a gamepad joystick motion event in chrome

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 22

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(2 files)

On ouya, getting the focus back to the layerview is pretty annoying currently. This is partly because directional focus is broken (bug 854981) but even with that fixed often you'll have to navigate through a bunch of UI elements before getting back to the layerview. it would be nice to immediately transfer focus to the layerview on receiving events that are only used there (e.g. the joystick used for panning).
Straightforward rename because the name OnTouchInterceptListener never made sense to me. Also add some braces.
Attachment #730361 - Flags: review?(mark.finkle)
We might need to twiddle this a bit if the joysticks are overly sensitive and send spurious events (this used to happen on older Ouya firmware but doesn't seem to happen now). Also we might need to revisit this when we hook up gamepad support for content.
Attachment #730362 - Flags: review?(mark.finkle)
Attachment #730361 - Flags: review?(mark.finkle) → review+
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #0)
> it would be nice to
> immediately transfer focus to the layerview on receiving events that are
> only used there (e.g. the joystick used for panning).

What about using joystick to spatial navigation through chrome UI elements? Or do we have a d-pad on these controllers that would be better to use?

Not sure using the joystick for spatial nav is a good idea, just asking about other possible uses.
There is a d-pad for spatial nav through UI elements, and we'll use the same d-pad for spatial nav through content once that code is resurrected. We could in theory hook up the joystick to UI spatial nav as well but it seems kind of redundant with the d-pad and also a lot more work because android won't map joystick inputs to focus navigation by default.

We do have a bug open for using joystick to scroll about:home which is the other place it makes sense to use the joystick. If we find other things that would benefit from joystick I'm not opposed to hooking those up as well, but I don't think there's anything in the current UI that really qualifies.
Attachment #730362 - Flags: review?(mark.finkle) → review+
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #4)
> There is a d-pad for spatial nav through UI elements, and we'll use the same
> d-pad for spatial nav through content once that code is resurrected. We
> could in theory hook up the joystick to UI spatial nav as well but it seems
> kind of redundant with the d-pad and also a lot more work because android
> won't map joystick inputs to focus navigation by default.
> 
> We do have a bug open for using joystick to scroll about:home which is the
> other place it makes sense to use the joystick. If we find other things that
> would benefit from joystick I'm not opposed to hooking those up as well, but
> I don't think there's anything in the current UI that really qualifies.

Sounds like a good plan to me. Thanks.
https://hg.mozilla.org/mozilla-central/rev/8d6834c316fe
https://hg.mozilla.org/mozilla-central/rev/c69d74aecb03
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.