From 770875608db1ca6d82fa4e64c10228b942874591 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 6 Nov 2015 00:32:45 -0500 Subject: [PATCH] let's see if this fixes #906 --- platform/firefox/vapi-background.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 0759b18e3..41e41b7cd 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -1220,6 +1220,17 @@ var tabWatcher = (function() { return; } + // https://github.com/gorhill/uBlock/issues/906 + // This might have been the cause. Will see. + if ( + document.readyState !== 'interactive' && + document.readyState !== 'complete' + ) { + console.log('document not ready'); + attachToTabBrowserLater({ window: window, tryCount: tryCount }); + return; + } + // On some platforms, the tab browser isn't immediately available, // try waiting a bit if this happens. // https://github.com/gorhill/uBlock/issues/763