Elements cannot be activated by clicking remote control

RESOLVED FIXED in Firefox 48

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: xeonchen, Assigned: xeonchen)

Tracking

unspecified
mozilla48
Points:
---

Firefox Tracking Flags

(firefox48 fixed)

Details

Attachments

(2 attachments)

(Assignee)

Description

3 years ago
Created attachment 8730653 [details] [diff] [review]
0001-Add-VK_SELECT-support.patch

Step to reproduce:
1. connect to a nexus player with B2G installed, and the remote control is already paired.
2. in settings app, navigate to an element with sub-menu, e.g. Wi-Fi.
3. click the button located in the center of direction keys.

Result: nothing happened
Expected result: entering sub-menu

[1] mentions we should activate the element by some kind of trigger,
but in [2], only |NS_VK_RETURN| is handled.

My experiment is that the element can be triggered successfully by add support for |VK_SELECT|.
Are we going to support more keys such as 'Accept' or 'Select' listed in [3]?

[1] https://www.w3.org/TR/DOM-Level-3-Events/#event-flow-activation
[2] https://dxr.mozilla.org/mozilla-central/rev/d6ee82b9a74155b6bfd544166f036fc572ae8c56/dom/base/Element.cpp#3045
[3] https://www.w3.org/TR/DOM-Level-3-Events-key/
(Assignee)

Updated

3 years ago
Attachment #8730653 - Flags: feedback?(masayuki)
Comment on attachment 8730653 [details] [diff] [review]
0001-Add-VK_SELECT-support.patch

Does the remote control has a button to cause VK_RETURN? If not so, I think that the button located in the center of direction key should cause VK_RETURN because the remote control cannot use on some web pages which listen to Enter key events.
Flags: needinfo?(xeonchen)
Attachment #8730653 - Flags: feedback?(masayuki)
Thanks @masayuki, then we should change the mapping from NS_VK_SELECT to NS_VK_RETURN here: https://dxr.mozilla.org/mozilla-central/source/widget/gonk/GonkKeyMapping.h#50
Another question: should we also change the key name mapping from "Accept" to "Return" at https://dxr.mozilla.org/mozilla-central/source/widget/NativeKeyToDOMKeyName.h#355 ?
The key code / key name mapping looks not synchronized to me.
Flags: needinfo?(masayuki)
(In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment #4)
> Another question: should we also change the key name mapping from "Accept"
> to "Return" at
> https://dxr.mozilla.org/mozilla-central/source/widget/NativeKeyToDOMKeyName.
> h#355 ?

Perhaps, yes. But please keep it. The attribute is still experimental until Chrome supports it in default settings. And I'll update some key values at once for conforming to the latest draft.

> The key code / key name mapping looks not synchronized to me.

Yes. key values are clearer defined but keyCode isn't defined by any standards. Therefore, keyCode is decided with the other browser's behavior.
Flags: needinfo?(masayuki)
(Assignee)

Comment 6

3 years ago
Seems S.C. already answered the questions
Flags: needinfo?(xeonchen)
(Assignee)

Comment 7

3 years ago
Created attachment 8731586 [details]
MozReview Request: Bug 1256618 - change VK_SELECT to VK_RETURN; r=masayuki

Review commit: https://reviewboard.mozilla.org/r/40735/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/40735/
Attachment #8731586 - Flags: review?(masayuki)
Comment on attachment 8731586 [details]
MozReview Request: Bug 1256618 - change VK_SELECT to VK_RETURN; r=masayuki

https://reviewboard.mozilla.org/r/40735/#review37501

Let's try this.
Attachment #8731586 - Flags: review?(masayuki) → review+

Comment 10

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/39e5c2cf1a5d
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox48: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
(Assignee)

Updated

3 years ago
Assignee: nobody → xeonchen
You need to log in before you can comment on or make changes to this bug.