mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
Bug 619412 - PanFinished is not fired on the same element as PanBegin [r=mfinkle]
This commit is contained in:
parent
b77cb68cef
commit
27af3051db
@ -446,7 +446,8 @@ var BrowserUI = {
|
||||
tabs.addEventListener("TabSelect", this, true);
|
||||
tabs.addEventListener("TabOpen", this, true);
|
||||
tabs.addEventListener("TabOpen", NewTabPopup, true);
|
||||
window.addEventListener("PanFinished", this, true);
|
||||
|
||||
Elements.browsers.addEventListener("PanFinished", this, true);
|
||||
|
||||
// listen content messages
|
||||
messageManager.addMessageListener("DOMLinkAdded", this);
|
||||
|
@ -1150,7 +1150,7 @@ Browser.MainDragger = function MainDragger() {
|
||||
this._scrollScales = { x: 0, y: 0 };
|
||||
|
||||
Elements.browsers.addEventListener("PanBegin", this, false);
|
||||
window.addEventListener("PanFinished", this, false);
|
||||
Elements.browsers.addEventListener("PanFinished", this, false);
|
||||
Elements.contentNavigator.addEventListener("SizeChanged", this, false);
|
||||
};
|
||||
|
||||
|
@ -94,6 +94,7 @@ function MouseModule() {
|
||||
this._inputField = null;
|
||||
|
||||
this._downUpEvents = [];
|
||||
this._targetScrollbox = null;
|
||||
this._targetScrollInterface = null;
|
||||
this._suppressNextMouseUp = false;
|
||||
|
||||
@ -169,6 +170,7 @@ MouseModule.prototype = {
|
||||
// made kinetic panning active.
|
||||
this._kinetic.end();
|
||||
|
||||
this._targetScrollbox = null;
|
||||
this._targetScrollInterface = null;
|
||||
|
||||
this._cleanClickBuffer();
|
||||
@ -193,6 +195,7 @@ MouseModule.prototype = {
|
||||
if (this._kinetic.isActive() && this._dragger != dragger)
|
||||
this._kinetic.end();
|
||||
|
||||
this._targetScrollbox = targetScrollbox;
|
||||
this._targetScrollInterface = targetScrollInterface;
|
||||
|
||||
// Do tap
|
||||
@ -304,7 +307,7 @@ MouseModule.prototype = {
|
||||
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent("PanBegin", true, false);
|
||||
aEvent.target.dispatchEvent(event);
|
||||
this._targetScrollbox.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -392,11 +395,9 @@ MouseModule.prototype = {
|
||||
this._dragger.dragStop(0, 0, this._targetScrollInterface);
|
||||
this._dragger = null;
|
||||
|
||||
// bug 619412
|
||||
// XXX why is PanFinished not dispatched on the same target as PanBegin
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent("PanFinished", true, false);
|
||||
document.dispatchEvent(event);
|
||||
this._targetScrollbox.dispatchEvent(event);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user