From a17c828af908962908b517e3bf91a3ce4a501302 Mon Sep 17 00:00:00 2001 From: Jim Mathies Date: Tue, 24 Sep 2013 16:17:26 -0500 Subject: [PATCH] Bug 915213 - Support chrome hit testing in the metrofx front end. r=bbondy --- browser/metro/base/content/input.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/browser/metro/base/content/input.js b/browser/metro/base/content/input.js index b47e770f771..4a13b7622a7 100644 --- a/browser/metro/base/content/input.js +++ b/browser/metro/base/content/input.js @@ -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; } } }