fix(ui): prevent space key from opening file/directory during rename in knowledge base (#25627)

This commit is contained in:
G30
2026-06-29 03:37:09 -05:00
committed by GitHub
parent 8bc4ac2641
commit a8e5f0a54d
2 changed files with 13 additions and 1 deletions
@@ -108,6 +108,7 @@
class="relative flex items-center gap-1 rounded-xl p-2 text-left flex-1 justify-between"
type="button"
on:click={() => {
if (editingFileId) return;
onClick(file?.id ?? file?.tempId);
}}
on:dblclick={() => {
@@ -125,6 +126,10 @@
on:keydown={(e) => {
if (e.key === 'Enter') submitRename();
if (e.key === 'Escape') cancelRename();
if (e.key === ' ') e.stopPropagation();
}}
on:keyup={(e) => {
if (e.key === ' ') e.stopPropagation();
}}
on:blur={submitRename}
on:click={(e) => e.stopPropagation()}