fix: renaming a folder with Enter saves it twice (#31584)

Renaming a folder in the sidebar and pressing Enter sent the rename to the server twice and showed "Folder updated successfully" twice, because Enter saved the name and closing the text field saved it again. Enter now just closes the text field, which saves the new name once and shows one confirmation.

Fixes #31582
This commit is contained in:
Classic298 authored and GitHub committed 2026-09-30 19:10:48 +04:00
1 parent 2062231f9c
commit 8b1ae1d331
1 file changed
+1 -2
@@ -835,8 +835,7 @@
}}
on:keydown={(e) => {
if (e.key === 'Enter') {
updateHandler({ name });
edit = false;
e.currentTarget.blur();
}
}}
class="w-full h-full bg-transparent outline-hidden"