Bug 593645 - use popup.triggerNode instead of document.popupNode for tab context menu; r=dao

This commit is contained in:
Frank Yan 2010-09-04 18:06:00 -04:00
Родитель d6ec63ace3
Коммит f9ebb2eb9d
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -8449,8 +8449,8 @@ function restoreLastSession() {
var TabContextMenu = { var TabContextMenu = {
contextTab: null, contextTab: null,
updateContextMenu: function updateContextMenu(aPopupMenu) { updateContextMenu: function updateContextMenu(aPopupMenu) {
this.contextTab = document.popupNode.localName == "tab" ? this.contextTab = aPopupMenu.triggerNode.localName == "tab" ?
document.popupNode : gBrowser.selectedTab; aPopupMenu.triggerNode : gBrowser.selectedTab;
let disabled = gBrowser.visibleTabs.length == 1; let disabled = gBrowser.visibleTabs.length == 1;
// Enable the "Close Tab" menuitem when the window doesn't close with the last tab. // Enable the "Close Tab" menuitem when the window doesn't close with the last tab.