title: Swift - NSMenu Item Popover doesnt get Focus
body: <p>so ive run into a strange Problem, which is kinda hard to explain, but i will try.</p>
  
  <p>I have a Status Menu Item :</p>
  
  <pre><code>let statusItem = NSStatusBar.systemStatusBar().statusItemWithLength(-2)
  </code></pre>
  
  <p>it contains a NSMenu :</p>
  
  <pre><code>        let menu = NSMenu()
          statusItem.menu = menu }
  </code></pre>
  
  <p>now i Add custom Menue Item to it, that can contain Buttons or whatever i want:</p>
  
  <pre><code>    var newController = storyBoard!.instantiateControllerWithIdentifier("testViewController") as! testCustomViewController
      var menueItem = NSMenuItem(title: title, action: action, keyEquivalent: key)
      menueItem.view = newController.view
      statusItem.menu?.addItem(menueItem)
  </code></pre>
  
  <p>after that i put a testButton into the menue, and let him call an Action.</p>
  
  <pre><code>    @IBAction func testClick(sender: NSButton) {
      appDelegate.testPopover(sender)
  }
  </code></pre>
  
  <p>so far all works just great and as intendet, ican interact with everything, and all is nice and cool.
  I can klick the icon, the menu opens and displays whatever i want.</p>
  
  <p>But now to the Problem.
  If i open a Popover on the Button (which works just perfect) and the Popover is open, i cant interact with the Popover.
  I can Still interact with the menu and Buttons and all is cool.
  But as soon as i click in the Popover, everthing hides. (it doesnt crash or something, it just closes the popover, menues and so on)</p>
  
  <p>I open the Popover like this.
  in init :</p>
  
  <pre><code>let Popover = NSPopover()
  Popover.contentViewController = storyBoard!.instantiateControllerWithIdentifier("test") as! NSViewController
  </code></pre>
  
  <p>in the testPopoverMethod :</p>
  
  <pre><code>Popover.showRelativeToRect(button.bounds, ofView: button, preferredEdge: NSMinYEdge)
  </code></pre>
  
  <p>So i tryed a lot of stuff, like "resignFirstResponder", "becomeFirstResponder" and ofc i tryed to change the behavior, but i just cant fix this problem.</p>
  
  <p>heres a Screenshot
  <a href="http://imgur.com/Wj95eQw" rel="nofollow">http://imgur.com/Wj95eQw</a>
  if i click anywhere in the Popover everything hides, doesnt matter where, and if theres a Button or a Text field, makes no difference...</p>
  
  <p>How can i fix this ?</p>