Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #9358 from bsclifton/master
Browse files Browse the repository at this point in the history
Revert "Revert "Remove destroy from popup menus""
  • Loading branch information
bsclifton authored Jun 9, 2017
2 parents 1a4a9f9 + 3ff6f0f commit f1ab997
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions js/contextMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -1339,21 +1339,18 @@ function onMainContextMenu (nodeProps, frame, tab, contextMenuType) {
} else {
const mainMenu = Menu.buildFromTemplate(mainTemplateInit(nodeProps, frame, tab))
mainMenu.popup(getCurrentWindow())
mainMenu.destroy()
}
}

function onFlashContextMenu (nodeProps, frameProps) {
const flashMenu = Menu.buildFromTemplate(flashTemplateInit(frameProps))
flashMenu.popup(getCurrentWindow())
flashMenu.destroy()
}

function onTabContextMenu (frameProps, e) {
e.stopPropagation()
const tabMenu = Menu.buildFromTemplate(tabTemplateInit(frameProps))
tabMenu.popup(getCurrentWindow())
tabMenu.destroy()
}

function onNewTabContextMenu (target) {
Expand All @@ -1365,14 +1362,12 @@ function onNewTabContextMenu (target) {
]
const menu = Menu.buildFromTemplate(menuTemplate)
menu.popup(getCurrentWindow())
menu.destroy()
}

function onTabsToolbarContextMenu (bookmarkTitle, bookmarkLink, closestDestinationDetail, isParent, e) {
e.stopPropagation()
const tabsToolbarMenu = Menu.buildFromTemplate(tabsToolbarTemplateInit(bookmarkTitle, bookmarkLink, closestDestinationDetail, isParent))
tabsToolbarMenu.popup(getCurrentWindow())
tabsToolbarMenu.destroy()
}

function onDownloadsToolbarContextMenu (downloadId, downloadItem, e) {
Expand All @@ -1381,14 +1376,12 @@ function onDownloadsToolbarContextMenu (downloadId, downloadItem, e) {
}
const downloadsToolbarMenu = Menu.buildFromTemplate(downloadsToolbarTemplateInit(downloadId, downloadItem))
downloadsToolbarMenu.popup(getCurrentWindow())
downloadsToolbarMenu.destroy()
}

function onTabPageContextMenu (framePropsList, e) {
e.stopPropagation()
const tabPageMenu = Menu.buildFromTemplate(tabPageTemplateInit(framePropsList))
tabPageMenu.popup(getCurrentWindow())
tabPageMenu.destroy()
}

function onUrlBarContextMenu (e) {
Expand All @@ -1398,14 +1391,12 @@ function onUrlBarContextMenu (e) {
const activeFrame = getActiveFrame(windowState)
const inputMenu = Menu.buildFromTemplate(urlBarTemplateInit(searchDetail, activeFrame, e))
inputMenu.popup(getCurrentWindow())
inputMenu.destroy()
}

function onFindBarContextMenu (e) {
e.stopPropagation()
const findBarMenu = Menu.buildFromTemplate(findBarTemplateInit(e))
findBarMenu.popup(getCurrentWindow())
findBarMenu.destroy()
}

function onSiteDetailContextMenu (siteDetail, activeFrame, e) {
Expand All @@ -1414,7 +1405,6 @@ function onSiteDetailContextMenu (siteDetail, activeFrame, e) {
}
const menu = Menu.buildFromTemplate(siteDetailTemplateInit(siteDetail, activeFrame))
menu.popup(getCurrentWindow())
menu.destroy()
}

function onLedgerContextMenu (location, hostPattern) {
Expand All @@ -1430,7 +1420,6 @@ function onLedgerContextMenu (location, hostPattern) {
]
const menu = Menu.buildFromTemplate(template)
menu.popup(getCurrentWindow())
menu.destroy()
}

function onShowBookmarkFolderMenu (bookmarks, bookmark, activeFrame, e) {
Expand Down

0 comments on commit f1ab997

Please sign in to comment.