Fix selecting the first item
[arvados-workbench2.git] / src / views-components / search-bar / search-bar-view.tsx
index 54a3f8f79717a7ab24f777e9f7fe901399272656..1a19b47d67dccbac6cc643f7caeb13006c9ee3a2 100644 (file)
@@ -101,6 +101,7 @@ const handleKeyDown = (e: React.KeyboardEvent, props: SearchBarViewProps) => {
         e.preventDefault();
         props.moveUp();
     } else if (e.keyCode === KEY_CODE_ESC) {
+        e.preventDefault();
         props.closeView();
     } else if (e.keyCode === KEY_ENTER) {
         if (props.currentView === SearchView.BASIC) {