I've figured out how to disable to popup (although the documentation does not mention this anywhere)
view.popupManager.enabled
But it does not close popups that are already open, how can I achieve that?
Solved! Go to Solution.
Try view.popup.close()
Try view.popup.close()