title: NSMenuItem with custom view doesn't receive mouse events
body: <p>I'm working on a menu bar app, and I'm setting a custom view using <code>NSMenuItem</code>'s <code>view</code> property.</p>
  
  <p>The view displays ok, but I'm unable to receive any kind of mouse click events for menu items that have open submenus.</p>
  
  <p>In this screenshot, I've added a button to each item. The 3 rightmost buttons function correctly, but the ones in the parent menus don't receive any click events at all.</p>
  
  <p><a href="https://i.stack.imgur.com/vBY1t.png" rel="noreferrer"><img src="https://i.stack.imgur.com/vBY1t.png" alt="Screenshot"></a></p>
  
  <p>I've tried a bunch of stuff, including:</p>
  
  <ul>
  <li>Trying to capture mouse events using the <code>mouseUp</code> and <code>mouseDown</code> methods</li>
  <li>Making the <code>NSWindow</code> for the custom view key when the mouse enters that view</li>
  <li>Adding global and local monitors for <code>NSEvents</code></li>
  </ul>
  
  <p>...but to no avail</p>
  
  <p>Even without the approach of adding a button, I can't replicate the default behaviour of a standard <code>NSMenuItem</code>, as the <code>target-action</code> callback for the <code>NSMenuItem</code> doesn't get called if it has a custom view. (and I can't receive any click events to call it myself)</p>
  
  <p>In theory this should be possible, because I am able to select menus that have open submenus using the default <code>NSMenuItem</code> (no custom view).</p>
  
  <p>Is anybody able to help?</p>
  
  <p>Thanks</p>