Don't trigger hotkeys within sidebar edit input

This commit is contained in:
Gregory Schier committed 2025-10-28 13:03:37 -07:00
1 parent 5b8114f6f3
commit a71fb8ed6c
2 files changed
+16 -11

No files matched your search

+2 -1
View File
@@ -156,7 +156,7 @@ function TreeItem_<T extends { id: string }>({
const handleEditKeyDown = useCallback(
async (e: React.KeyboardEvent<HTMLInputElement>) => {
e.stopPropagation();
e.stopPropagation(); // Don't trigger other tree keys (like arrows)
switch (e.key) {
case 'Enter':
if (editing) {
@@ -331,6 +331,7 @@ function TreeItem_<T extends { id: string }>({
const { defaultValue, placeholder } = getEditOptions(node.item);
return (
<input
data-disable-hotkey
ref={handleEditFocus}
defaultValue={defaultValue}
placeholder={placeholder}