mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 898002 - Ignore synthesized touch events. r=marcoz
This commit is contained in:
parent
16d39e2738
commit
0c4cc83442
@ -42,6 +42,9 @@ this.TouchAdapter = {
|
||||
// The virtual touch ID generated by a mouse event.
|
||||
MOUSE_ID: 'mouse',
|
||||
|
||||
// Synthesized touch ID.
|
||||
SYNTH_ID: -1,
|
||||
|
||||
start: function TouchAdapter_start() {
|
||||
Logger.info('TouchAdapter.start');
|
||||
|
||||
@ -131,6 +134,13 @@ this.TouchAdapter = {
|
||||
return;
|
||||
}
|
||||
|
||||
let changedTouches = aEvent.changedTouches || [aEvent];
|
||||
|
||||
if (changedTouches.length == 1 &&
|
||||
changedTouches[0].identifier == this.SYNTH_ID) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.eventsOfInterest[aEvent.type]) {
|
||||
aEvent.preventDefault();
|
||||
aEvent.stopImmediatePropagation();
|
||||
@ -142,8 +152,6 @@ this.TouchAdapter = {
|
||||
delete this._delayedEvent;
|
||||
}
|
||||
|
||||
let changedTouches = aEvent.changedTouches || [aEvent];
|
||||
|
||||
// XXX: Until bug 77992 is resolved, on desktop we get microseconds
|
||||
// instead of milliseconds.
|
||||
let timeStamp = (Utils.OS == 'Android') ? aEvent.timeStamp : Date.now();
|
||||
|
Loading…
Reference in New Issue
Block a user