Closed Bug 1004714 Opened 6 years ago Closed 6 years ago

Value selector uses mouse events when it should be using touch events

Categories

(Firefox OS Graveyard :: Gaia::System::Input Mgmt, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(tracking-b2g:backlog)

RESOLVED FIXED
2.0 S1 (9may)
tracking-b2g backlog

People

(Reporter: mdas, Assigned: timdream)

References

Details

Attachments

(1 file)

value_selector.js expects mousedown events for drag gestures, but we do not dispatch mouse events for anything other than a tap. The de-facto standard we're using is 'mouse events for click, touch events for everything else', and so this breaks compatibility with our gesture automation and blocks Bug 946130.

As an example: https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/value_selector/value_selector.js#L72, this is the code handles the AM/PM selection animation, which *only* happens if you drag your fingers on it, ie: it is a gesture other than tap, and so it should use touch events. 

There are other mouse events used for picker objects in this file, so they may have the same issue.
Tim - This is blocking a bunch of on device automation in the system app (see bug 946130). Can you have someone look into this?
Flags: needinfo?(timdream)
I don't expect we will be able to pick this up for 2.0 s1/s2, but I can set myself as assignee first until we have time to look at it.
blocking-b2g: --- → backlog
Flags: needinfo?(timdream)
Assignee: nobody → timdream
Comment on attachment 8417899 [details] [review]
mozilla-b2g:master PR#18977

The original line reported was unrelated to this issue; we listen mousedown event for canceling the focus from being taken away from the controls in app.

The actual mouse events to change is located in value_picker.js

Malini, would you try this patch and see if this do what you want?
Attachment #8417899 - Flags: feedback?(mdas)
Status: NEW → ASSIGNED
Summary: value_selector.js uses mouse events when it should be using touch events → Value selector uses mouse events when it should be using touch events
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from comment #4)
> Comment on attachment 8417899 [details] [review]
> mozilla-b2g:master PR#18977
> 
> The original line reported was unrelated to this issue; we listen mousedown
> event for canceling the focus from being taken away from the controls in app.
> 
> The actual mouse events to change is located in value_picker.js
Ah okay, thanks for the clarification
> 
> Malini, would you try this patch and see if this do what you want?

Yes, I've just tested it and it works perfectly, thank you!
Comment on attachment 8417899 [details] [review]
mozilla-b2g:master PR#18977

f+ based on the above comment.
Attachment #8417899 - Flags: review?(rlu)
Attachment #8417899 - Flags: feedback?(mdas)
Attachment #8417899 - Flags: feedback+
Comment on attachment 8417899 [details] [review]
mozilla-b2g:master PR#18977

Looks good to me.
Thanks.
Attachment #8417899 - Flags: review?(rlu) → review+
master: https://github.com/mozilla-b2g/gaia/commit/49b6db5b06ba7ba39a9bc6d05248f9981edbb129
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S1 (9may)
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.