From 5590f63e42fda38d780bdc390361a65b65576498 Mon Sep 17 00:00:00 2001
From: Nate Sesti <sestinj@gmail.com>
Date: Sat, 12 Aug 2023 00:26:23 -0700
Subject: feat: :sparkles: improvement to @ search rankings

---
 extension/react-app/src/components/ComboBox.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'extension/react-app/src/components/ComboBox.tsx')

diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx
index b189e442..651d6227 100644
--- a/extension/react-app/src/components/ComboBox.tsx
+++ b/extension/react-app/src/components/ComboBox.tsx
@@ -431,6 +431,11 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
                 event.preventDefault();
               } else if (event.key === "Tab") {
                 (event.nativeEvent as any).preventDownshiftDefault = true;
+              } else if (
+                (event.key === "ArrowUp" || event.key === "ArrowDown") &&
+                items.length > 0
+              ) {
+                return;
               } else if (event.key === "ArrowUp") {
                 // Only go back in history if selectionStart is 0
                 // (i.e. the cursor is at the beginning of the input)
@@ -438,11 +443,6 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
                   positionInHistory == 0 ||
                   event.currentTarget.selectionStart !== 0
                 ) {
-                  console.log(
-                    "returning",
-                    positionInHistory,
-                    event.currentTarget.selectionStart
-                  );
                   (event.nativeEvent as any).preventDownshiftDefault = true;
                   return;
                 } else if (
-- 
cgit v1.2.3-70-g09d2

