Fix dropdown and dialog key handling

This commit is contained in:
Gregory Schier
2023-04-01 21:04:39 -07:00
parent 35e25842be
commit 5b563b8a16
3 changed files with 14 additions and 3 deletions

View File

@@ -167,9 +167,11 @@ const _SidebarItem = forwardRef(function SidebarItem(
async (e: KeyboardEvent<HTMLInputElement>) => {
switch (e.key) {
case 'Enter':
e.preventDefault();
await handleSubmitNameEdit(e.currentTarget);
break;
case 'Escape':
e.preventDefault();
setEditing(false);
break;
}