File tree Expand file tree Collapse file tree
apps/client/src/widgets/dialogs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export default function PromptDialog() {
6969 submitValue . current = null ;
7070 opts . current = undefined ;
7171 } }
72- footer = { < Button text = { t ( "prompt.ok" ) } keyboardShortcut = "Enter " kind = "primary" /> }
72+ footer = { < Button text = { t ( "prompt.ok" ) } keyboardShortcut = "ctrl+return " kind = "primary" /> }
7373 show = { shown }
7474 stackable
7575 >
@@ -78,6 +78,13 @@ export default function PromptDialog() {
7878 inputRef = { answerRef }
7979 currentValue = { value } onChange = { setValue }
8080 readOnly = { opts . current ?. readOnly }
81+ onKeyDown = { ( e : KeyboardEvent ) => {
82+ if ( ( e . ctrlKey || e . metaKey ) && e . key === "Enter" ) {
83+ e . preventDefault ( ) ;
84+ submitValue . current = answerRef . current ?. value || value ;
85+ setShown ( false ) ;
86+ }
87+ } }
8188 />
8289 </ FormGroup >
8390 </ Modal >
You can’t perform that action at this time.
0 commit comments