Bug 518203 - Non-working "Close tab" context menu appears when right-clicking anywhere beside tabs

r/a-SM2.0=mnyromyr sr=neil
This commit is contained in:
Philip Chee 2009-10-11 23:15:13 +08:00
Родитель 63f2971a19
Коммит b772a1f199
1 изменённых файлов: 13 добавлений и 3 удалений

Просмотреть файл

@ -216,11 +216,11 @@
<xul:tooltip onpopupshowing="var tabmail = this.parentNode.parentNode.parentNode;
return tabmail.FillTabmailTooltip(document, event);"/>
<xul:menupopup anonid="tabContextMenu"
onpopupshowing="var tabmail = this.parentNode.parentNode.parentNode;
tabmail.mContextTab = document.popupNode;">
onpopupshowing="return document.getBindingParent(this)
.onTabContextMenuShowing();">
<xul:menuitem label="&closeTabCmd.label;"
accesskey="&closeTabCmd.accesskey;"
oncommand="var tabmail = this.parentNode.parentNode.parentNode.parentNode;
oncommand="var tabmail = document.getBindingParent(this);
tabmail.removeTab(tabmail.mContextTab);"/>
</xul:menupopup>
<xul:tabs class="tabbrowser-tabs tabmail-tabs"
@ -782,6 +782,16 @@
</body>
</method>
<method name="onTabContextMenuShowing">
<body>
<![CDATA[
// The user might right-click on a non-tab area of the tab strip.
this.mContextTab = document.popupNode;
return this.mContextTab.localName == "tab";
]]>
</body>
</method>
<!-- getBrowserForSelectedTab is required as some toolkit functions
require a getBrowser() function. -->
<method name="getBrowserForSelectedTab">