Open ericlaw1979 opened 5 years ago
This also happens when toggling the "Allow access to file urls"
The problem goes away if you use Chrome's DevTools to inspect the background page. So the problem may be correlated with the Background page being marked "Inactive"?
It may not be relevant for this issue, but it seems like this:
chrome.tabs.query({}, (tabs) => {
tabs.forEach((tab) => {
setBrowserActionAndIcon(tab);
});
});
could be safely changed to
chrome.tabs.query({"active":true}, (tabs) => {
tabs.forEach((tab) => {
setBrowserActionAndIcon(tab);
});
});
This would speed up the initial load cost?
One other oddity; if I inspect the background page while toggling these checkboxes, the |Sources| tab seems to show the background page's script loading multiple times. I don't see this with one of my own extensions that uses a background page/js.
Documentation for chrome.tabs.onActivated
notes that it can fire before tab.url
is available, so the setBrowserActionAndIcon
call should probably check whether tab.url
is assigned before attempting to call startsWith
on it.
This also reproduces on Mac OSX in Chrome Canary with the official extension.
Interestingly, when I build the extension locally and load it "unpacked", the problem does not reproduce.
Toggling "Allow Incognito" on the settings page turns the flag orange and enables it such that you end up with this funny UI whereby it offers to submit a report about a![image](https://user-images.githubusercontent.com/4192774/62259811-4cd5d980-b3d5-11e9-9b0c-0ffb87e91655.png)
chrome:
URL: