-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent close and onClose event? #85
Comments
Can you provide more details - which component, and the scenario you'd want to prevent close? |
Sorry for the lack of information, I was talking about the dialog. Also nested dialogs render inside each other and cannot be set to absolute if you have relative containers on top. I saw in other libraries they use Portals to manage this better, don't know if that can be a solution |
And what is the situation where the user wants to close a dialog, but the system should get to say "nuhuh"? IMO it should always be equivalent to a 'cancel' action. I'm not a fan of nested dialogs, I think the UX should always be re-thought at that point. |
I have also ran into this, as the dialog that we use is a complex dialog, with forms and multiple steps. Because of technical limitations (integrating with 3rd party), we are forced to use a dialog for this interaction, and while I understand this is not the ideal use case of the dialog, the lack of customizability on the close behavior prevents us from using it. It would be a bad user experience if the user accidentally hits escape or clicks outside of the dialog - as they are forced to repeat all the steps to get to the same point. It would be great if your library provided a way to prevent these default actions. |
I see, so you want to protect against accidental closure from them clicking anything but the |
Yes, that's correct. |
It a lot of use cases we want to add functionality when closing as prevent the close whenever a condition is met.
The text was updated successfully, but these errors were encountered: