Closed Bug 881453 Opened 6 years ago Closed 6 years ago

[AccessFu] Cancel both touch and mouse events all the time

Categories

(Core :: Disability Access APIs, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: eeejay, Assigned: eeejay)

Details

Attachments

(1 file, 1 obsolete file)

On desktop, the desktop-helper extension in Gaia translates mouse events to touch events, unless there are mouse listeners, then it uses mouse events. Bottom line: We need to block both touch and mouse events.
Attachment #760571 - Flags: review?(yura.zenevich)
I took some of your input, and did some testing. In gonk (b2g devices), we get concurrent mouse and touch events. So we should only use touch events. I added the widgetToolkit as a cleaner way to get what we want. I also removed the glass element, as far as I can tell this patch solves that issue. It was a horrible hack.
Attachment #760571 - Attachment is obsolete: true
Attachment #760571 - Flags: review?(yura.zenevich)
Attachment #761087 - Flags: review?(yura.zenevich)
Comment on attachment 761087 [details] [diff] [review]
Bug 881453 - Block both mouse and touch events in touch adapter.

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

r=me Looks awesome :)

::: accessible/src/jsat/TouchAdapter.jsm
@@ +109,5 @@
> +          'mousedown' : true,
> +          'mouseup': true,
> +          'click': false };
> +        if ('ontouchstart' in Utils.win) {
> +          for each (let eventType in ['touchstart', 'touchmove', 'touchend']) {

Nit:

Looks like for each...in is deprecated, this should do the same:

for (let eventType of ['touchstart', 'touchmove', 'touchend']) {...}
Attachment #761087 - Flags: review?(yura.zenevich) → review+
(In reply to Yura Zenevich [:yzen] from comment #3)
> Nit:
> 
> Looks like for each...in is deprecated, this should do the same:
> 
> for (let eventType of ['touchstart', 'touchmove', 'touchend']) {...}

Very good to know that!
https://hg.mozilla.org/mozilla-central/rev/58e071c453ef
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.