fix: unable to delete by select all in left bar search, closes #368

This commit is contained in:
Fabio Di Stasio 2022-07-13 18:50:16 +02:00
parent ed3d35f131
commit 7725fafe85
1 changed files with 1 additions and 11 deletions

View File

@ -235,17 +235,7 @@ const refresh = async () => {
}
};
const explorebarSearch = (e: KeyboardEvent) => {
if (e.code === 'Backspace') {
e.preventDefault();
if (searchTerm.value.length)
searchTerm.value = searchTerm.value.slice(0, -1);
else
return;
}
else if (e.key.length > 1)// Prevent non-alphanumerics
return;
const explorebarSearch = () => {
searchInput.value.focus();
};