Fake touch events helper on desktop breaks scripted clicks

RESOLVED FIXED

Status

Firefox OS
Gaia
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: eeejay, Unassigned)

Tracking

unspecified

Firefox Tracking Flags

(b2g18 fixed)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
An app may want to activate an item in a scripted fashion. This is typically done with a click event, which is the de-facto activation event and has been divorced from the mouse device metaphor. This is also how our accessibility engine activates controls.

The solution is to allow mouse events with the a mozInputSource of MOZ_SOURCE_UNKNOWN through unmodified.
(Reporter)

Updated

5 years ago
Blocks: 863422
(Reporter)

Comment 1

5 years ago
Created attachment 747102 [details] [diff] [review]
Ignore scripted mouse events in desktop helper TouchEventHandler.
Attachment #747102 - Flags: review?(kgrandon)
Comment on attachment 747102 [details] [diff] [review]
Ignore scripted mouse events in desktop helper TouchEventHandler.

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

I don't really know enough about the inner workings of the accessibility stuff, but wouldn't you want to use the touch events to activate elements?

In any case, I tested this out and everything seems to work fine - it's low enough risk that we can go ahead and land it.
Attachment #747102 - Flags: review?(kgrandon) → review+
(Reporter)

Comment 3

5 years ago
Pull request:
https://github.com/mozilla-b2g/gaia/pull/9646

(In reply to Kevin Grandon :kgrandon from comment #2)
> Comment on attachment 747102 [details] [diff] [review]
> Ignore scripted mouse events in desktop helper TouchEventHandler.
> 
> Review of attachment 747102 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I don't really know enough about the inner workings of the accessibility
> stuff, but wouldn't you want to use the touch events to activate elements?
> 

Actually, their should be a device agnostic standard way of activating a widget, they tried that with DOMActivate and that failed. So |click| is considered the standard activation event, you could expect to see more patches in the future that add click listeners in gaia :)

Here is some context:
http://lists.w3.org/Archives/Public/public-hypertext-cg/2010JanMar/0001.html
http://dev.w3.org//2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#click-synthesis
(Reporter)

Comment 4

5 years ago
master: 768d0f0
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Comment on attachment 747102 [details] [diff] [review]
Ignore scripted mouse events in desktop helper TouchEventHandler.

Regression introduced by bug 863422 that has already been uplifted.

Requesting uplift as we would like to have all of the developer tools/productivity related things uplifted. It also has zero impact to gaia builds as all changes are external to application code.
Attachment #747102 - Flags: approval-gaia-v1?
Attachment #747102 - Flags: approval-gaia-v1? → approval-gaia-v1+
v1-train: a8a58acb551f9bbd1c855d4a64e1c124d7021fd2
status-b2g18: --- → fixed
You need to log in before you can comment on or make changes to this bug.