Skip to content

Loading…

Fix for #1176 #1179

Merged
merged 1 commit into from

2 participants

@AlexVallat
Collaborator

This should fix #1176, and I don't think there's any good reason to onNavigate in noTab.

@chrisaljoudi chrisaljoudi merged commit 213ab01 into chrisaljoudi:master
@AlexVallat AlexVallat deleted the AlexVallat:Fix_for_1176 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 4, 2015
  1. @AlexVallat

    Fix for #1176

    AlexVallat committed
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +3 −1 platform/firefox/vapi-background.js
  2. +1 −1 src/js/popup.js
View
4 platform/firefox/vapi-background.js
@@ -1326,7 +1326,9 @@ vAPI.net.registerListeners = function() {
var details = e.data;
var browser = e.target;
var tabId = vAPI.tabs.getTabId(browser);
-
+ if (tabId === vAPI.noTabId) {
+ return; // Do not navigate for behind the scenes
+ }
//console.debug("nsIWebProgressListener: onLocationChange: " + details.url + " (" + details.flags + ")");
// LOCATION_CHANGE_SAME_DOCUMENT = "did not load a new document"
View
2 src/js/popup.js
@@ -743,7 +743,7 @@ uDom.onLoad(function () {
var tabId = null; //If there's no tab ID specified in the query string, it will default to current tab.
// Extract the tab id of the page this popup is for
- var matches = window.location.search.match(/[\?&]tabId=([^&]+)/);
+ var matches = window.location && window.location.search.match(/[\?&]tabId=([^&]+)/);
if (matches && matches.length === 2) {
tabId = matches[1];
}
Something went wrong with that request. Please try again.