Bug 915213 - Support chrome hit testing in the metrofx front end. r=bbondy

This commit is contained in:
Jim Mathies 2013-09-24 16:17:26 -05:00
parent 3db249355d
commit a17c828af9

View File

@ -95,6 +95,7 @@ var TouchModule = {
window.addEventListener("CancelTouchSequence", this, true);
window.addEventListener("dblclick", this, true);
window.addEventListener("keydown", this, true);
window.addEventListener("MozMouseHittest", this, true);
// bubble phase
window.addEventListener("contextmenu", this, false);
@ -160,6 +161,13 @@ var TouchModule = {
case "keydown":
this._handleKeyDown(aEvent);
break;
case "MozMouseHittest":
// Used by widget to hit test chrome vs content
if (aEvent.target.ownerDocument == document) {
aEvent.preventDefault();
}
aEvent.stopPropagation();
break;
}
}
}