Detect dummy group tab correctly even if it is still loading
This commit is contained in:
parent
a82d5adac8
commit
c51112886a
@ -2065,17 +2065,26 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
|
|||||||
|
|
||||||
isGroupTab : function TSTBase_isGroupTab(aTab, aLazyCheck)
|
isGroupTab : function TSTBase_isGroupTab(aTab, aLazyCheck)
|
||||||
{
|
{
|
||||||
return aTab.linkedBrowser.currentURI.spec.indexOf('about:treestyletab-group') == 0;
|
return this.getLoadingURI(aTab).indexOf('about:treestyletab-group') == 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
isTemporaryGroupTab : function TSTBase_isTemporaryGroupTab(aTab)
|
isTemporaryGroupTab : function TSTBase_isTemporaryGroupTab(aTab)
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
this.isGroupTab(aTab) &&
|
this.isGroupTab(aTab) &&
|
||||||
/.*[\?&;]temporary=(?:1|yes|true)/i.test(aTab.linkedBrowser.currentURI.spec)
|
/.*[\?&;]temporary=(?:1|yes|true)/i.test(this.getLoadingURI(aTab))
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getLoadingURI : function TSTBase_getLoadingURI(aTab)
|
||||||
|
{
|
||||||
|
var uri = aTab.linkedBrowser.currentURI;
|
||||||
|
if (uri.spec == 'about:blank' &&
|
||||||
|
aTab.linkedBrowser.userTypedValue)
|
||||||
|
return aTab.linkedBrowser.userTypedValue;
|
||||||
|
return uri.spec;
|
||||||
|
},
|
||||||
|
|
||||||
get pinnedTabsCount()
|
get pinnedTabsCount()
|
||||||
{
|
{
|
||||||
return this.browser.mTabContainer.querySelectorAll('tab[pinned="true"]').length;
|
return this.browser.mTabContainer.querySelectorAll('tab[pinned="true"]').length;
|
||||||
|
Loading…
Reference in New Issue
Block a user