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 2026-09-30 17:10:48 +02:00 • committed by GitHub
parent 2062231f9c
commit 8b1ae1d331
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"