Bug 1143388 - Loading an item from the readinglist shouldn't make the user leave the reader mode if it was active, r=jaws.

This commit is contained in:
Florian Quèze 2015-03-24 23:44:28 +01:00
parent 067fb8ef2f
commit a0fd72c7ac
2 changed files with 7 additions and 1 deletions

View File

@ -519,6 +519,7 @@ let AboutReaderListener = {
// Update the toolbar icon to show the "reader active" icon.
sendAsyncMessage("Reader:UpdateReaderButton");
new AboutReader(global, content, this._articlePromise);
this._articlePromise = null;
}
break;

View File

@ -301,6 +301,11 @@ let RLSidebar = {
.rootTreeItem
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow);
let currentUrl = mainWindow.gBrowser.currentURI.spec;
if (currentUrl.startsWith("about:reader"))
url = "about:reader?url=" + encodeURIComponent(url);
mainWindow.openUILink(url, event);
},
@ -422,7 +427,7 @@ let RLSidebar = {
} else if (event.keyCode == KeyEvent.DOM_VK_RETURN) {
let selectedItem = this.selectedItem;
if (selectedItem) {
this.activeItem = this.selectedItem;
this.activeItem = selectedItem;
this.openActiveItem(event);
}
}