зеркало из https://github.com/mozilla/gecko-dev.git
Bug 779358 - Fix mousemove event handled twice in content panning, r=cjones
This commit is contained in:
Родитель
5c97dc6e65
Коммит
201d23326e
|
@ -5,7 +5,7 @@
|
|||
const ContentPanning = {
|
||||
init: function cp_init() {
|
||||
['mousedown', 'mouseup', 'mousemove'].forEach(function(type) {
|
||||
addEventListener(type, ContentPanning, true);
|
||||
addEventListener(type, ContentPanning, false);
|
||||
});
|
||||
|
||||
addMessageListener("Viewport:Change", this._recvViewportChange.bind(this));
|
||||
|
@ -30,7 +30,7 @@ const ContentPanning = {
|
|||
let target = evt.target;
|
||||
let view = target.ownerDocument ? target.ownerDocument.defaultView
|
||||
: target;
|
||||
view.removeEventListener('click', this, true, true);
|
||||
view.removeEventListener('click', this, false, true);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
@ -83,7 +83,7 @@ const ContentPanning = {
|
|||
let target = this.target;
|
||||
let view = target.ownerDocument ? target.ownerDocument.defaultView
|
||||
: target;
|
||||
view.addEventListener('click', this, true, true);
|
||||
view.addEventListener('click', this, false, true);
|
||||
}
|
||||
|
||||
if (this.panning)
|
||||
|
@ -107,6 +107,8 @@ const ContentPanning = {
|
|||
this.panning = true;
|
||||
this._resetActive();
|
||||
}
|
||||
evt.stopPropagation();
|
||||
evt.preventDefault();
|
||||
},
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче