Press Enter on an input in a Dialog will submit based on the primary button

Hi,


From what I understand whenever we hit Enter in an input it will trigger a click on the primary button, even when the input(s) is not in a form.


Looks like a weird behavior, at least the DialogButton should be set as a sumbit button.

For now its just because it contains .e-primary css class that it triggers a submit.
Please consider submit only if the type of the DialogButton is 

Syncfusion.Blazor.Popups.ButtonType.Submit.


It's particularily not convenient when we use a SfMultiSelect with AllowCustom="true", because users will often validate a custom value by pressing Enter.



Repro : https://blazorplayground.syncfusion.com/BtBxDHMxSsiihFJf


Regards,

Julien


1 Reply 1 reply marked as answer

PK Priyanka Karthikeyan Syncfusion Team June 18, 2026 01:30 PM UTC

Hi Julien Barach,

We have further validated the reported behavior. When pressing the Enter key while an input element inside the dialog is focused, the DialogButton’s OnClick event is automatically triggered. This is expected browser and framework behavior.
In HTML forms and dialog-like UI patterns, when any input element (except a textarea) is in focus and the user presses Enter, the browser treats it as a request to activate the primary action button.

Because the DialogButton acts as the primary button in this scenario, its OnClick event is triggered.

This behavior is not specific to the Dialog component it is the standard default interaction model of HTML input controls.


Regards,
Priyanka K

Marked as answer
Loader.
Up arrow icon