зеркало из https://github.com/mozilla/pjs.git
Bug 173703 Closing a tab left to the active tab using middle-click displays a blank screen
patch by neil@parkwaycc.co.uk r=hj sr=jag
This commit is contained in:
Родитель
1899d13b8a
Коммит
d61d7190c5
|
@ -51,8 +51,7 @@
|
||||||
|
|
||||||
<content>
|
<content>
|
||||||
<xul:stringbundle src="chrome://global/locale/tabbrowser.properties"/>
|
<xul:stringbundle src="chrome://global/locale/tabbrowser.properties"/>
|
||||||
<xul:tabbox flex="1" eventnode="document"
|
<xul:tabbox flex="1" eventnode="document">
|
||||||
onselect="if (!('updateCurrentBrowser' in this.parentNode) || event.target.localName != 'tabpanels') return; this.parentNode.updateCurrentBrowser();">
|
|
||||||
<xul:hbox class="tabbrowser-strip chromeclass-toolbar" collapsed="true" tooltip="_child" context="_child">
|
<xul:hbox class="tabbrowser-strip chromeclass-toolbar" collapsed="true" tooltip="_child" context="_child">
|
||||||
<xul:tooltip onpopupshowing="event.preventBubble(); if (document.tooltipNode.hasAttribute('label')) { this.setAttribute('label', document.tooltipNode.getAttribute('label')); return true; } return false;"/>
|
<xul:tooltip onpopupshowing="event.preventBubble(); if (document.tooltipNode.hasAttribute('label')) { this.setAttribute('label', document.tooltipNode.getAttribute('label')); return true; } return false;"/>
|
||||||
<xul:menupopup onpopupshowing="this.parentNode.parentNode.parentNode.updatePopupMenu(this);">
|
<xul:menupopup onpopupshowing="this.parentNode.parentNode.parentNode.updatePopupMenu(this);">
|
||||||
|
@ -814,13 +813,13 @@
|
||||||
this.mTabContainer.removeChild(oldTab);
|
this.mTabContainer.removeChild(oldTab);
|
||||||
this.mPanelContainer.removeChild(oldBrowser);
|
this.mPanelContainer.removeChild(oldBrowser);
|
||||||
|
|
||||||
this.selectedTab = this.mTabContainer.childNodes[newIndex];
|
// When the current tab is removed select a new tab
|
||||||
|
// and fire select events on tabpanels and tabs
|
||||||
|
this.mTabContainer.selectedIndex = newIndex;
|
||||||
|
|
||||||
if (newIndex == index) {
|
// When removing a tab to the left of the current tab
|
||||||
// No select event is going to fire. We need to just call updateCurrentBrowser()
|
// fix up the panel index without firing any events
|
||||||
// by hand.
|
this.mPanelContainer.selectedIndex = newIndex;
|
||||||
this.updateCurrentBrowser();
|
|
||||||
}
|
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
@ -1182,6 +1181,8 @@
|
||||||
</implementation>
|
</implementation>
|
||||||
|
|
||||||
<handlers>
|
<handlers>
|
||||||
|
<handler event="select" action="if (event.originalTarget == this.mPanelContainer) this.updateCurrentBrowser();"/>
|
||||||
|
|
||||||
<handler event="keypress" modifiers="control" keycode="vk_f4" action="this.removeCurrentTab();"/>
|
<handler event="keypress" modifiers="control" keycode="vk_f4" action="this.removeCurrentTab();"/>
|
||||||
|
|
||||||
<handler event="DOMWindowClose">
|
<handler event="DOMWindowClose">
|
||||||
|
|
Загрузка…
Ссылка в новой задаче