diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index 93324e7db..e8114b110 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -88,8 +88,8 @@ vAPI.tabs.registerListeners = function() { var popupCandidates = Object.create(null); var PopupCandidate = function(details) { - this.targetTabId = details.tabId; - this.openerTabId = details.sourceTabId; + this.targetTabId = details.tabId.toString(); + this.openerTabId = details.sourceTabId.toString(); this.targetURL = details.url; this.selfDestructionTimer = null; }; diff --git a/src/js/tab.js b/src/js/tab.js index 7809948bb..5c4745549 100644 --- a/src/js/tab.js +++ b/src/js/tab.js @@ -137,7 +137,7 @@ housekeep itself. var gcPeriod = 10 * 60 * 1000; var TabContext = function(tabId) { - this.tabId = tabId; + this.tabId = tabId.toString(); this.stack = []; this.rawURL = this.normalURL = @@ -414,8 +414,8 @@ vAPI.tabs.onPopup = function(details) { //console.debug('vAPI.tabs.onPopup: details = %o', details); var tabContext = µb.tabContextManager.lookup(details.openerTabId); - var openerURL = details.openerURL || ''; - if ( openerURL === '' && tabContext.tabId === details.openerTabId ) { + var openerURL = ''; + if ( tabContext.tabId === details.openerTabId ) { openerURL = tabContext.normalURL; }