I only want to catch when the user clicks somewhere outside of the popup in order to avoid auto-popup close unintentionally. I want to show a confirm message if they really want to close the popup or not.
This can be done with custom implementation, you need to detect the click outside of the popup, use a confirm to verify the intention and close the popup based on the confirm.