Skip to content

Commit 2731cf8

Browse files
pictosjfversluis
andauthored
Add support to dismiss the prompt with enter on keyboard (#27419)
* add support to dismiss the prompt with enter on keyboard * Windows only --------- Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>
1 parent ae25749 commit 2731cf8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Controls/src/Core/Platform/AlertManager/AlertManager.Windows.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ async void OnPromptRequested(Page sender, PromptArguments arguments)
143143
Input = arguments.InitialValue ?? string.Empty,
144144
Placeholder = arguments.Placeholder ?? string.Empty,
145145
MaxLength = arguments.MaxLength >= 0 ? arguments.MaxLength : 0,
146-
InputScope = arguments.Keyboard.ToInputScope()
146+
InputScope = arguments.Keyboard.ToInputScope(),
147+
DefaultButton = ContentDialogButton.Primary
147148
};
148149

149150
if (arguments.Cancel != null)

0 commit comments

Comments
 (0)