Bug 887177 - Right clicking on a network request should select it, r=rcampbell

This commit is contained in:
Victor Porof 2013-06-26 23:35:38 +03:00
parent 1973753238
commit 125526fd5b
2 changed files with 9 additions and 2 deletions

View File

@ -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;

View File

@ -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;
}