Support for disabling opening and closing the popup when button is clicked. Makes possible to control opening and closing the popup in code.