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