зеркало из https://github.com/mozilla/pjs.git
Bug 408243 - Back & Forward buttons on mouse does not navigate in Library/Places Organizer. r=gavin, a=mconnor.
This commit is contained in:
Родитель
260f6ce5de
Коммит
c975dbdf59
|
@ -80,6 +80,7 @@ var PlacesOrganizer = {
|
|||
// Set up the advanced query builder UI
|
||||
PlacesQueryBuilder.init();
|
||||
|
||||
window.addEventListener("AppCommand", this, true);
|
||||
#ifdef XP_MACOSX
|
||||
// 1. Map Edit->Find command to the organizer's command
|
||||
var findMenuItem = document.getElementById("menu_find");
|
||||
|
@ -95,6 +96,34 @@ var PlacesOrganizer = {
|
|||
#endif
|
||||
},
|
||||
|
||||
QueryInterface: function PO_QueryInterface(aIID) {
|
||||
if (aIID.equals(Components.interfaces.nsIDOMEventListener) ||
|
||||
aIID.equals(Components.interfaces.nsISupports))
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_NOINTERFACE;
|
||||
},
|
||||
|
||||
handleEvent: function PO_handleEvent(aEvent) {
|
||||
if (aEvent.type != "AppCommand")
|
||||
return;
|
||||
|
||||
aEvent.stopPropagation();
|
||||
switch (aEvent.command) {
|
||||
case "Back":
|
||||
if (this._backHistory.length > 0)
|
||||
this.back();
|
||||
break;
|
||||
case "Forward":
|
||||
if (this._forwardHistory.length > 0)
|
||||
this.forward();
|
||||
break;
|
||||
case "Search":
|
||||
PlacesSearchBox.findAll();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
destroy: function PO_destroy() {
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче