-
Notifications
You must be signed in to change notification settings - Fork 327
Open
Description
Expected behavior
Submitting a form by pressing "Enter" on keyboard, while a form element is in focus, triggers a submit event on the form. If the submit handler also closes the dialog,
Actual Behavior
A submit handler is added on the form, which closes the dialog the form is in.
When pressing "Enter" on keyboard, while a form element is in focus, the form will be submitted, close the dialog, but then reopen the dialog.
It seems submit is triggered on key-down, then focus is back on the invoker and on key-up, it invokes the dialog again.
Reproduction steps
https://stackblitz.com/~/github.com/Hzunax/lion-demo
Switch to branch issue-dialog-form-submit
- Open dialog
- Set focus on the input
- Press "Enter" on keyboard
- You will see the dialog invoked again
Metadata
Metadata
Assignees
Labels
No labels