diff --git a/browser/devtools/netmonitor/netmonitor-view.js b/browser/devtools/netmonitor/netmonitor-view.js index afdd1e59fc4..00125227ca4 100644 --- a/browser/devtools/netmonitor/netmonitor-view.js +++ b/browser/devtools/netmonitor/netmonitor-view.js @@ -278,6 +278,7 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, { this.widget = new SideMenuWidget($("#requests-menu-contents"), false); this._summary = $("#request-menu-network-summary"); + this.allowFocusOnRightClick = true; this.widget.maintainSelectionVisible = false; this.widget.autoscrollWithAppendedItems = true; diff --git a/browser/devtools/shared/widgets/ViewHelpers.jsm b/browser/devtools/shared/widgets/ViewHelpers.jsm index 848fabd895f..167f9e8710e 100644 --- a/browser/devtools/shared/widgets/ViewHelpers.jsm +++ b/browser/devtools/shared/widgets/ViewHelpers.jsm @@ -1025,6 +1025,12 @@ this.WidgetMethods = { */ autoFocusOnInput: true, + /** + * When focusing on input, allow right clicks? + * @see WidgetMethods.autoFocusOnInput + */ + allowFocusOnRightClick: false, + /** * The number of elements in this container to jump when Page Up or Page Down * keys are pressed. If falsy, then the page size will be based on the @@ -1541,12 +1547,12 @@ this.WidgetMethods = { }, /** - * The keyPress event listener for this container. + * The mousePress event listener for this container. * @param string aName * @param MouseEvent aEvent */ _onWidgetMousePress: function(aName, aEvent) { - if (aEvent.button != 0) { + if (aEvent.button != 0 && !this.allowFocusOnRightClick) { // Only allow left-click to trigger this event. return; }