Bug 1299286 - Add the touchdownstartsdrag attribute to customize mode elements. r=jaws
MozReview-Commit-ID: LziDBjACA0
--- a/browser/components/customizableui/CustomizeMode.jsm
+++ b/browser/components/customizableui/CustomizeMode.jsm
@@ -901,16 +901,22 @@ CustomizeMode.prototype = {
} else if (wrapper.hasAttribute("haswideitem")) {
wrapper.removeAttribute("haswideitem");
}
}
let removable = aPlace == "palette" || CustomizableUI.isWidgetRemovable(aNode);
wrapper.setAttribute("removable", removable);
+ if (AppConstants.platform == "win") {
+ // Allow touch events to initiate dragging in customize mode.
+ // This is only supported on Windows for now.
+ wrapper.setAttribute("touchdownstartsdrag", "true");
+ }
+
let contextMenuAttrName = "";
if (aNode.getAttribute("context")) {
contextMenuAttrName = "context";
} else if (aNode.getAttribute("contextmenu")) {
contextMenuAttrName = "contextmenu";
}
let currentContextMenu = aNode.getAttribute(contextMenuAttrName);
let contextMenuForPlace = aPlace == "panel" ?