From e952d8890533135ce06b5500c01b056245319816 Mon Sep 17 00:00:00 2001 From: rahulramesha <71900764+rahulramesha@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:06:02 +0530 Subject: [PATCH] fix spreadsheet labels dropdown keyboard navigation (#4209) --- .../issues/issue-layouts/properties/labels.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/web/components/issues/issue-layouts/properties/labels.tsx b/web/components/issues/issue-layouts/properties/labels.tsx index e2212d0c7..3c5592115 100644 --- a/web/components/issues/issue-layouts/properties/labels.tsx +++ b/web/components/issues/issue-layouts/properties/labels.tsx @@ -221,7 +221,7 @@ export const IssuePropertyLabels: React.FC = observer((pro value={value} onChange={onChange} disabled={disabled} - onKeyDownCapture={handleKeyDown} + onKeyDown={handleKeyDown} multiple > @@ -232,8 +232,8 @@ export const IssuePropertyLabels: React.FC = observer((pro disabled ? "cursor-not-allowed text-custom-text-200" : value.length <= maxRender - ? "cursor-pointer" - : "cursor-pointer hover:bg-custom-background-80" + ? "cursor-pointer" + : "cursor-pointer hover:bg-custom-background-80" } ${buttonClassName}`} onClick={handleOnClick} > @@ -270,6 +270,12 @@ export const IssuePropertyLabels: React.FC = observer((pro { + if (e.key === "Enter") { + e.preventDefault(); + e.stopPropagation(); + } + }} className={({ active, selected }) => `flex cursor-pointer select-none items-center justify-between gap-2 truncate rounded px-1 py-1.5 hover:bg-custom-background-80 ${ active ? "bg-custom-background-80" : ""