Skip to content

Commit

Permalink
ContentDialog.DefaultButton should accepts only `Button.IsEnabled =…
Browse files Browse the repository at this point in the history
… true`. (#311)

Thank you for contributing!
  • Loading branch information
atsusy committed May 28, 2022
1 parent 6018884 commit 4b8da0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ModernWpf.Controls/ContentDialog/ContentDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ private void HandleKeyDown(KeyEventArgs e)
button = PrimaryButton ?? SecondaryButton ?? CloseButton;
}

if (button != null)
if (button != null && button.IsEnabled)
{
OnButtonClick(button, null);
e.Handled = true;
Expand Down

0 comments on commit 4b8da0b

Please sign in to comment.