Merge pull request #593 from jonathanKingston/current-tab-window

Fix for current tab showing the wrong window. Fixes #592
This commit is contained in:
luke crouch
2017-06-15 10:30:06 -05:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -163,7 +163,6 @@ const assignManager = {
remove = true; remove = true;
} }
await this._setOrRemoveAssignment(tab.id, info.pageUrl, userContextId, remove); await this._setOrRemoveAssignment(tab.id, info.pageUrl, userContextId, remove);
this.calculateContextMenu(tab);
} }
}, },
@@ -216,6 +215,8 @@ const assignManager = {
event: `${actionName}-container-assignment`, event: `${actionName}-container-assignment`,
userContextId: userContextId, userContextId: userContextId,
}); });
const tab = await browser.tabs.get(tabId);
this.calculateContextMenu(tab);
}, },
async _getAssignment(tab) { async _getAssignment(tab) {
+1 -1
View File
@@ -134,7 +134,7 @@ const Logic = {
}, },
async currentTab() { async currentTab() {
const activeTabs = await browser.tabs.query({active: true}); const activeTabs = await browser.tabs.query({active: true, windowId: browser.windows.WINDOW_ID_CURRENT});
if (activeTabs.length > 0) { if (activeTabs.length > 0) {
return activeTabs[0]; return activeTabs[0];
} }