Dispatch custom event to notify other addons that the tab bar is rendered by TST.
This event is required to fix the issue #938 with Unified Sidebar.
This commit is contained in:
parent
809cc403c6
commit
050a87e108
@ -2086,6 +2086,10 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
|
|||||||
else
|
else
|
||||||
this.positionPinnedTabsWithDelay(null, null, aReason & this.kTABBAR_UPDATE_BY_AUTOHIDE);
|
this.positionPinnedTabsWithDelay(null, null, aReason & this.kTABBAR_UPDATE_BY_AUTOHIDE);
|
||||||
|
|
||||||
|
var event = d.createEvent('Events');
|
||||||
|
event.initEvent(this.kEVENT_TYPE_TABBAR_RENDERED, true, false);
|
||||||
|
this.mTabBrowser.tabContainer.dispatchEvent(event);
|
||||||
|
|
||||||
if (!collapsed && aReason & this.kTABBAR_UPDATE_BY_AUTOHIDE)
|
if (!collapsed && aReason & this.kTABBAR_UPDATE_BY_AUTOHIDE)
|
||||||
setTimeout((function() {
|
setTimeout((function() {
|
||||||
if (this.browser) // ignore calling after destroyed...
|
if (this.browser) // ignore calling after destroyed...
|
||||||
|
@ -131,6 +131,7 @@ var TreeStyleTabConstants = Object.freeze({
|
|||||||
kEVENT_TYPE_TABBAR_POSITION_CHANGED : 'nsDOMTreeStyleTabTabbarPositionChanged',
|
kEVENT_TYPE_TABBAR_POSITION_CHANGED : 'nsDOMTreeStyleTabTabbarPositionChanged',
|
||||||
kEVENT_TYPE_TABBAR_STATE_CHANGING : 'nsDOMTreeStyleTabTabbarStateChanging',
|
kEVENT_TYPE_TABBAR_STATE_CHANGING : 'nsDOMTreeStyleTabTabbarStateChanging',
|
||||||
kEVENT_TYPE_TABBAR_STATE_CHANGED : 'nsDOMTreeStyleTabTabbarStateChanged',
|
kEVENT_TYPE_TABBAR_STATE_CHANGED : 'nsDOMTreeStyleTabTabbarStateChanged',
|
||||||
|
kEVENT_TYPE_TABBAR_RENDERED : 'nsDOMTreeStyleTabTabbarRendered',
|
||||||
kEVENT_TYPE_FOCUS_NEXT_TAB : 'nsDOMTreeStyleTabFocusNextTab',
|
kEVENT_TYPE_FOCUS_NEXT_TAB : 'nsDOMTreeStyleTabFocusNextTab',
|
||||||
kEVENT_TYPE_ATTACHED : 'nsDOMTreeStyleTabAttached',
|
kEVENT_TYPE_ATTACHED : 'nsDOMTreeStyleTabAttached',
|
||||||
kEVENT_TYPE_DETACHED : 'nsDOMTreeStyleTabParted',
|
kEVENT_TYPE_DETACHED : 'nsDOMTreeStyleTabParted',
|
||||||
|
Loading…
Reference in New Issue
Block a user