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:
Родитель
63f2971a19
Коммит
b772a1f199
|
@ -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">
|
||||
|
|
Загрузка…
Ссылка в новой задаче