We have a native safari extension for macOS with an NSTokenField and completions. When clicking one of the completions in the list, the window for the extension closes as though you had clicked outside of it, even if you click in the portion that intersects the popup.
If I run the extension as a regular app, the issue doesn't happen. The click registers and adds the token from the completion list.
I filed feedback (FB12606023), but need to fix the issue also. Is this somehow expected in a popup?