diff --git a/devtools/client/shared/SplitView.jsm b/devtools/client/shared/SplitView.jsm index b3313193e9..588e1f79d5 100644 --- a/devtools/client/shared/SplitView.jsm +++ b/devtools/client/shared/SplitView.jsm @@ -209,6 +209,9 @@ SplitView.prototype = { this._nav.appendChild(aSummary); aSummary.addEventListener("click", (aEvent) => { + if (aEvent.button != 0) { + return; + } aEvent.stopPropagation(); this.activeSummary = aSummary; }, false); diff --git a/devtools/client/shared/autocomplete-popup.js b/devtools/client/shared/autocomplete-popup.js index e848f6c1fd..e07494c03c 100644 --- a/devtools/client/shared/autocomplete-popup.js +++ b/devtools/client/shared/autocomplete-popup.js @@ -97,6 +97,9 @@ AutocompletePopup.prototype = { }, onClick: function (e) { + if (e.button != 0) { + return; + } let item = e.target.closest(".autocomplete-item"); if (item && typeof item.dataset.index !== "undefined") { this.selectedIndex = parseInt(item.dataset.index, 10); diff --git a/devtools/client/shared/widgets/Spectrum.js b/devtools/client/shared/widgets/Spectrum.js index 00110f13e6..2baf3f722f 100644 --- a/devtools/client/shared/widgets/Spectrum.js +++ b/devtools/client/shared/widgets/Spectrum.js @@ -240,6 +240,9 @@ Spectrum.prototype = { }, onElementClick: function (e) { + if (e.button != 0) { + return; + } e.stopPropagation(); }, diff --git a/devtools/client/shared/widgets/TableWidget.js b/devtools/client/shared/widgets/TableWidget.js index 57d2914d5a..f54ee8a485 100644 --- a/devtools/client/shared/widgets/TableWidget.js +++ b/devtools/client/shared/widgets/TableWidget.js @@ -1480,6 +1480,9 @@ Column.prototype = { * for sorting. */ onClick: function (event) { + if (event.button != 0) { + return; + } let target = event.originalTarget; if (target.nodeType !== target.ELEMENT_NODE || target == this.column) { diff --git a/devtools/client/styleeditor/StyleEditorUI.jsm b/devtools/client/styleeditor/StyleEditorUI.jsm index d0f9f8d1b8..3f8042131a 100644 --- a/devtools/client/styleeditor/StyleEditorUI.jsm +++ b/devtools/client/styleeditor/StyleEditorUI.jsm @@ -174,7 +174,10 @@ StyleEditorUI.prototype = { this._view = new SplitView(viewRoot); - wire(this._view.rootElement, ".style-editor-newButton", () =>{ + wire(this._view.rootElement, ".style-editor-newButton", (e) =>{ + if (e.button != 0) { + return; + } this._debuggee.addStyleSheet(null); });