fix: restore typing in branch dropdown search fields

Prevent menu typeahead from intercepting search input keystrokes
Fix branch search in worktree and Git sidebar dropdowns
Cover related directory tree and integrate branch inputs
This commit is contained in:
Bohdan Triapitsyn
2026-05-17 23:48:05 +03:00
parent 622927c34c
commit 5c1333a139
4 changed files with 14 additions and 5 deletions
@@ -815,13 +815,12 @@ export const DirectoryTree: React.FC<DirectoryTreeProps> = ({
value={newDirName}
onChange={(e) => setNewDirName(e.target.value)}
onKeyDown={(e) => {
e.stopPropagation();
if (e.key === 'Enter') {
e.preventDefault();
e.stopPropagation();
createDirectory();
} else if (e.key === 'Escape') {
e.preventDefault();
e.stopPropagation();
cancelCreatingDirectory();
}
}}
@@ -904,13 +903,12 @@ export const DirectoryTree: React.FC<DirectoryTreeProps> = ({
value={newDirName}
onChange={(e) => setNewDirName(e.target.value)}
onKeyDown={(e) => {
e.stopPropagation();
if (e.key === 'Enter') {
e.preventDefault();
e.stopPropagation();
createDirectory();
} else if (e.key === 'Escape') {
e.preventDefault();
e.stopPropagation();
cancelCreatingDirectory();
}
}}