We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f2e7b1 commit 8770812Copy full SHA for 8770812
.changeset/fresh-days-know.md
@@ -0,0 +1,5 @@
1
+---
2
+'@sveltejs/repl': patch
3
4
+
5
+(fix) avoid automatic newline when renaming/creating a file
packages/repl/src/lib/Input/ComponentSelector.svelte
@@ -244,8 +244,14 @@
244
bind:value={input_value}
245
on:focus={select_input}
246
on:blur={close_edit}
247
- on:keydown={(e) =>
248
- e.key === 'Enter' && !is_file_name_used(editing_file) && e.currentTarget.blur()}
+ on:keydown={(e) => {
+ if (e.key === 'Enter') {
249
+ e.preventDefault();
250
+ if (!is_file_name_used(editing_file)) {
251
+ e.currentTarget.blur();
252
+ }
253
254
+ }}
255
class:duplicate={is_file_name_used(editing_file)}
256
/>
257
{/if}
0 commit comments