<ul dir="auto">
<li>Electron version: 1.6.2</li>
<li>Operating system: macOS 10.12.4 (Sierra)</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">A disabled submenu should be grayed out and not open when <code class="notranslate">enabled: false</code> is set. See Finder &gt; Go &gt; Recent Folder if the user has clicked Clear Menu in that submenu.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Submenu is not grayed out and can be opened</p>
<h3 dir="auto">How to reproduce</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const template = [
{
	label: 'File',
	submenu: [
	{
		label: 'Recent Files',
		enabled: false,
		submenu: [
		{
			label: 'test'
		}
		]
	}
	]
}
]

const menu = Menu.buildFromTemplate(template)
Menu.setApplicationMenu(menu)
"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">template</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
	<span class="pl-c1">label</span>: <span class="pl-s">'File'</span><span class="pl-kos">,</span>
	<span class="pl-c1">submenu</span>: <span class="pl-kos">[</span>
	<span class="pl-kos">{</span>
		<span class="pl-c1">label</span>: <span class="pl-s">'Recent Files'</span><span class="pl-kos">,</span>
		<span class="pl-c1">enabled</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
		<span class="pl-c1">submenu</span>: <span class="pl-kos">[</span>
		<span class="pl-kos">{</span>
			<span class="pl-c1">label</span>: <span class="pl-s">'test'</span>
		<span class="pl-kos">}</span>
		<span class="pl-kos">]</span>
	<span class="pl-kos">}</span>
	<span class="pl-kos">]</span>
<span class="pl-kos">}</span>
<span class="pl-kos">]</span>

<span class="pl-k">const</span> <span class="pl-s1">menu</span> <span class="pl-c1">=</span> <span class="pl-v">Menu</span><span class="pl-kos">.</span><span class="pl-en">buildFromTemplate</span><span class="pl-kos">(</span><span class="pl-s1">template</span><span class="pl-kos">)</span>
<span class="pl-v">Menu</span><span class="pl-kos">.</span><span class="pl-en">setApplicationMenu</span><span class="pl-kos">(</span><span class="pl-s1">menu</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">When I set ´enabled: false´ to a menu entry which has a submenu with more entries, it doesn't get disabled.</p>
<p dir="auto">Platform: Mac OS X</p>