Check existence of event.detail.swipe before converting touchend events into key events for remote-control service

RESOLVED INVALID

Status

Firefox OS
Gaia::TV
RESOLVED INVALID
2 years ago
2 years ago

People

(Reporter: chunmin, Assigned: chunmin)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
The remote-control server on TV side will convert the touch events sent from Fennec side into the key events by the "swipe" value of the "touchend" messages[0] if the control mode is not "cursor" mode.

However, the "swipe" might not exist in touchend messages. There is a move threshold for touch-pad control to filter the input of inadvertent touch. Thus, I think we might need to check existence of event.detail.swipe before converting touchend events into key events[2].


[0] https://wiki.mozilla.org/Firefox_OS/Remote_Control#Touch_Events
[1] https://github.com/ChunMinChang/fennec-fxos-tv/blob/master/content/remote-control-client/js/panel_element.js#L11
[2] https://github.com/mozilla-b2g/gecko-b2g/blob/b2g48_v2_6/b2g/chrome/content/remote_command.js#L133
(Assignee)

Comment 1

2 years ago
Created attachment 8763809 [details] [diff] [review]
[v1] check event.detail.swipe of touchend events

Hi SC,
Could you review this small change?
Assignee: nobody → cchang
Status: NEW → ASSIGNED
Attachment #8763809 - Flags: review?(schien)
(Assignee)

Updated

2 years ago
Blocks: 1253245
(Assignee)

Updated

2 years ago
See Also: → bug 1278773
Comment on attachment 8763809 [details] [diff] [review]
[v1] check event.detail.swipe of touchend events

Review of attachment 8763809 [details] [diff] [review]:
-----------------------------------------------------------------

If |detail.swipe| is not existed, it shall fall into default case and does nothing. Not sure why this modification make difference.
Attachment #8763809 - Flags: review?(schien) → review-
(Assignee)

Comment 3

2 years ago
Oh yeah, it my bad. False alarm!
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID
(Assignee)

Updated

2 years ago
See Also: bug 1278773
You need to log in before you can comment on or make changes to this bug.