-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After Firefox start group bar is empty #18
Comments
I modified (hacked) that function and it seems to be working. Be warned - consider my solution only as a temporary workaround (I have no deeper understanding of that code, I cannot say if it won't affect some other stuff). // Puts the tabs on the main bar
objTabGroupBar.addGroupTabs = function() {
if (typeof this.getTabView === "function") this.tabView = this.getTabView(); // monnef fix
if (this.tabView == null) return; // monnef fix
let contentWindow = this.tabView.getContentWindow();
if (contentWindow == null) return; // monnef fix
let groupItems = contentWindow.GroupItems.groupItems;
let activeGroup = contentWindow.GroupItems.getActiveGroupItem();
for (let i = 0; i < groupItems.length; i++) {
this.addGroupTab(groupItems[i]);
groupItems[i].addSubscriber("close", this.reloadGroupTabs);
this.tabsLoaded = true;
if (groupItems[i] == activeGroup) {
this.tabsContainer.selectedItem = this.tabsContainer.lastChild;
}
}
}; |
Alright, my previous code just suppresses showing errors but doesn't actually fix anything. I forked it and tried to make it working (and now it, for most part, is). If creator or anyone else is interested, then here you go -> https://github.com/mnn/Tab-Group-Bar. |
Please note that the 'this' object at startup points not to the "expected" container (object object). It points to window object in this context. TypeError: contentWindow is null tabgroupbar.js:1xx The 'this' reference should be used as rarely as possible. Please use the container object generally instead 'this' to avoid these side effects. Please recheck. |
I've taken a few stabs at this bug, but it's very difficult to pin down. I've thought that I fixed it a few times but it popped up again. The behavior isn't reproducible in any straightforward way --- sometimes it fails to load, sometimes it doesn't. This makes it hard to know whether a solution really works or the problem just stopped by coincidence. There may also be some interference from the Tab Mix Plus extension, which apparently also tries to hook into tab group loading. |
In browser console is
TypeError: contentWindow is null
on line 176 of tabgroupbar.jsrelevant code:
let groupItems = contentWindow.GroupItems.groupItems;
inobjTabGroupBar.addGroupTabs
The text was updated successfully, but these errors were encountered: