mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Don't popup context menu with no items, fixes #2032.
On OS X popuping an empty context menu would have no effect but on Linux an empty menu container would still be showed.
This commit is contained in:
@@ -98,5 +98,6 @@ class ContextMenuManager
|
||||
showForEvent: (event) ->
|
||||
@activeElement = event.target
|
||||
menuTemplate = @combinedMenuTemplateForElement(event.target)
|
||||
return unless menuTemplate?.length > 0
|
||||
@executeBuildHandlers(event, menuTemplate)
|
||||
remote.getCurrentWindow().emit('context-menu', menuTemplate)
|
||||
|
||||
Reference in New Issue
Block a user