diff --git a/extension/background.ts b/extension/background.ts index d554c4285..96d137ccd 100644 --- a/extension/background.ts +++ b/extension/background.ts @@ -1,5 +1,7 @@ chrome.browserAction.onClicked.addListener(rcxMain.inlineToggle); -chrome.tabs.onSelectionChanged.addListener(rcxMain.onTabSelect); +chrome.tabs.onActivated.addListener((activeInfo) => { + rcxMain.onTabSelect(activeInfo.tabId); +}); chrome.runtime.onMessage.addListener(function (request, sender, response) { switch (request.type) { case 'enable?': diff --git a/extension/rikaichan.ts b/extension/rikaichan.ts index 5062440c2..352259765 100644 --- a/extension/rikaichan.ts +++ b/extension/rikaichan.ts @@ -49,7 +49,7 @@ window.rcxMain = { return this.dict.init(this.haveNames); }, - // The callback for onSelectionChanged + // The callback for `onActivated` // Just sends a message to the tab to enable itself if it hasn't // already onTabSelect: function (tabId) {