-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Dialog by default closes on return keypress with success status. However, there doesn't seem to be a good way to prevent this if you want to use an ajax request to determine the success.
Example: I have a sign-in dialog that I want to appear throughout the site and have different success callbacks in some cases so I observe the container's ui:dialog:close:after event and success means the sign-in was successful and otherwise not. But if the user presses enter the dialog is closed with success and there is no way for my callback to distinguish a success from my ajax callback versus the return keypress.
Suggestion: at minimum, add a closeOnReturn option so this behavior can be easily disabled. Otherwise, it seems like the most logical action for the return keypress would be to trigger the click action of the primary button so that the actions attached to the button are executed instead of just always closing the window.