Skip to content

Commit 065af16

Browse files
committed
fix: Modal enter key not submitting issue
1 parent 536c9f8 commit 065af16

File tree

1 file changed

+33
-35
lines changed

1 file changed

+33
-35
lines changed

src/lib/layout/createProject.svelte

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -22,44 +22,42 @@
2222
{/each}
2323
</svelte:head>
2424

25-
<form on:submit|preventDefault>
25+
<Layout.Stack direction="column" gap="xxl">
26+
{#if showTitle}
27+
<Typography.Title size="l">Create your project</Typography.Title>
28+
{/if}
2629
<Layout.Stack direction="column" gap="xxl">
27-
{#if showTitle}
28-
<Typography.Title size="l">Create your project</Typography.Title>
29-
{/if}
3030
<Layout.Stack direction="column" gap="xxl">
31-
<Layout.Stack direction="column" gap="xxl">
32-
<Layout.Stack direction="column" gap="s">
33-
<Input.Text
34-
label="Name"
35-
placeholder="Project name"
36-
required
37-
autofocus
38-
bind:value={projectName} />
39-
{#if !showCustomId}
40-
<div>
41-
<Tag
42-
size="s"
43-
on:click={() => {
44-
showCustomId = true;
45-
}}><Icon slot="start" icon={IconPencil} size="s" /> Project ID</Tag>
46-
</div>
47-
{/if}
48-
<CustomId bind:show={showCustomId} name="Project" isProject bind:id />
49-
</Layout.Stack>
50-
{#if isCloud && regions.length > 0}
51-
<Layout.Stack gap="xs">
52-
<Input.Select
53-
required
54-
bind:value={region}
55-
placeholder="Select a region"
56-
options={filterRegions(regions)}
57-
label="Region" />
58-
<Typography.Text>Region cannot be changed after creation</Typography.Text>
59-
</Layout.Stack>
31+
<Layout.Stack direction="column" gap="s">
32+
<Input.Text
33+
label="Name"
34+
placeholder="Project name"
35+
required
36+
autofocus
37+
bind:value={projectName} />
38+
{#if !showCustomId}
39+
<div>
40+
<Tag
41+
size="s"
42+
on:click={() => {
43+
showCustomId = true;
44+
}}><Icon icon={IconPencil} slot="start" size="s" /> Project ID</Tag>
45+
</div>
6046
{/if}
47+
<CustomId bind:show={showCustomId} name="Project" isProject bind:id />
6148
</Layout.Stack>
49+
{#if isCloud && regions.length > 0}
50+
<Layout.Stack gap="xs">
51+
<Input.Select
52+
required
53+
bind:value={region}
54+
placeholder="Select a region"
55+
options={filterRegions(regions)}
56+
label="Region" />
57+
<Typography.Text>Region cannot be changed after creation</Typography.Text>
58+
</Layout.Stack>
59+
{/if}
6260
</Layout.Stack>
63-
<slot name="submit"></slot>
6461
</Layout.Stack>
65-
</form>
62+
<slot name="submit"></slot>
63+
</Layout.Stack>

0 commit comments

Comments
 (0)