зеркало из https://github.com/mozilla/gecko-dev.git
Bug 456382 - mousing on last tab shouldn't close window (middle click, close button, context menu). ui-r=beltzner, r=gavin
This commit is contained in:
Родитель
732f12ec13
Коммит
6c1240878f
|
@ -119,7 +119,7 @@
|
||||||
<xul:menuseparator/>
|
<xul:menuseparator/>
|
||||||
<xul:menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;"
|
<xul:menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;"
|
||||||
oncommand="var tabbrowser = this.parentNode.parentNode.parentNode.parentNode;
|
oncommand="var tabbrowser = this.parentNode.parentNode.parentNode.parentNode;
|
||||||
tabbrowser.removeTab(tabbrowser.mContextTab);"/>
|
tabbrowser.removeClickedTab(tabbrowser.mContextTab);"/>
|
||||||
</xul:menupopup>
|
</xul:menupopup>
|
||||||
|
|
||||||
<xul:tabs class="tabbrowser-tabs" flex="1"
|
<xul:tabs class="tabbrowser-tabs" flex="1"
|
||||||
|
@ -1015,7 +1015,7 @@
|
||||||
if (event.button != 1 || event.target.localName != 'tab')
|
if (event.button != 1 || event.target.localName != 'tab')
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.removeTab(event.target);
|
this.removeClickedTab(event.target);
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
|
@ -1497,6 +1497,15 @@
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
<method name="removeClickedTab">
|
||||||
|
<parameter name="aTab"/>
|
||||||
|
<body>
|
||||||
|
<![CDATA[
|
||||||
|
this._endRemoveTab(this._beginRemoveTab(aTab, true, false));
|
||||||
|
]]>
|
||||||
|
</body>
|
||||||
|
</method>
|
||||||
|
|
||||||
<!-- Returns everything that _endRemoveTab needs in an array. -->
|
<!-- Returns everything that _endRemoveTab needs in an array. -->
|
||||||
<method name="_beginRemoveTab">
|
<method name="_beginRemoveTab">
|
||||||
<parameter name="aTab"/>
|
<parameter name="aTab"/>
|
||||||
|
@ -3292,7 +3301,7 @@
|
||||||
// Reset the "ignored click" flag
|
// Reset the "ignored click" flag
|
||||||
this._ignoredClick = false;
|
this._ignoredClick = false;
|
||||||
|
|
||||||
tabbedBrowser.removeTab(bindingParent);
|
tabbedBrowser.removeClickedTab(bindingParent);
|
||||||
tabbedBrowser._blockDblClick = true;
|
tabbedBrowser._blockDblClick = true;
|
||||||
|
|
||||||
/* XXXmano hack (see bug 343628):
|
/* XXXmano hack (see bug 343628):
|
||||||
|
|
Загрузка…
Ссылка в новой задаче