diff --git a/apps/client/src/widgets/dialogs/prompt.tsx b/apps/client/src/widgets/dialogs/prompt.tsx
index 0a37d0e643..78741641ae 100644
--- a/apps/client/src/widgets/dialogs/prompt.tsx
+++ b/apps/client/src/widgets/dialogs/prompt.tsx
@@ -24,6 +24,7 @@ export interface PromptDialogOptions {
shown?: PromptShownDialogCallback;
callback?: (value: string | null) => void;
readOnly?: boolean;
+ submitWithCtrlEnter?: boolean;
}
export default function PromptDialog() {
@@ -69,7 +70,7 @@ export default function PromptDialog() {
submitValue.current = null;
opts.current = undefined;
}}
- footer={}
+ footer={}
show={shown}
stackable
>
@@ -79,7 +80,7 @@ export default function PromptDialog() {
currentValue={value} onChange={setValue}
readOnly={opts.current?.readOnly}
onKeyDown={(e: KeyboardEvent) => {
- if ((e.ctrlKey || e.metaKey) && e.key === "Enter") {
+ if (opts.current?.submitWithCtrlEnter && (e.ctrlKey || e.metaKey) && e.key === "Enter") {
e.preventDefault();
submitValue.current = answerRef.current?.value || value;
setShown(false);
diff --git a/apps/client/src/widgets/type_widgets/relation_map/RelationMap.tsx b/apps/client/src/widgets/type_widgets/relation_map/RelationMap.tsx
index 867fd44d39..14dfad9e72 100644
--- a/apps/client/src/widgets/type_widgets/relation_map/RelationMap.tsx
+++ b/apps/client/src/widgets/type_widgets/relation_map/RelationMap.tsx
@@ -416,6 +416,7 @@ function useRelationCreation({ mapApiRef, jsPlumbApiRef }: { mapApiRef: RefObjec
if (!originalEvent || !mapApiRef.current) return;
const name = await dialog.prompt({
+ submitWithCtrlEnter: true,
message: t("relation_map.specify_new_relation_name"),
shown: ({ $answer }) => {
if (!$answer) {