Bug 1410985 - Run the pocket-library animation if the item was added, regardless of the position of the Pocket button. r=adw

MozReview-Commit-ID: H5jFPHeusJL

--HG--
extra : rebase_source : d2dde89cfb127ac47e0d4ba49c29d26649831f39
This commit is contained in:
Jared Wein 2017-10-24 17:40:59 -04:00
parent 2d9fdd1bcf
commit e42a0ecfec

View File

@ -165,6 +165,10 @@ var PocketPageAction = {
PocketPageAction.pocketedBrowserInnerWindowID = browser.innerWindowID;
},
onIframeHidden(iframe, panel) {
if (iframe.getAttribute("itemAdded") == "true") {
iframe.ownerGlobal.LibraryUI.triggerLibraryAnimation("pocket");
}
if (!PocketPageAction.urlbarNode) {
return;
}
@ -173,7 +177,6 @@ var PocketPageAction = {
delete PocketPageAction.urlbarNode;
if (iframe.getAttribute("itemAdded") == "true") {
iframe.ownerGlobal.LibraryUI.triggerLibraryAnimation("pocket");
PocketPageAction.innerWindowIDsByBrowser.set(
PocketPageAction.pocketedBrowser,
PocketPageAction.pocketedBrowserInnerWindowID