I have an NSTokenField and I provide custom autocomplete inside a popover. Unfortunately, as soon as a popup appears, it forces the NSTokenField to resign. Is there a way to show a popover but not lose the first responder on an NSTokenField?
Overriding the NSTokenField resignFirstResponder causes the NSTokenField to stop working (it does not accept any keystrokes). Overriding NSPopover accepts the FirstResponder method or sets its behavior, as suggested in this , the question does not work either.
Edit: NSTokenField is not inside the contents of contentViewController.view. Edit2: Such behavior as the search bar in Mailapp would be the best solution. 

cocoa macos nspopover
Lukas
source share