From 66f2492e606c384ec919f19e30f8179b48038af8 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Wed, 6 Mar 2024 19:17:50 +0530 Subject: [PATCH] [WEB-655] chore: peek overview dropdowns keyboard navigation improvement (#3888) * fix: enums export in the types package * chore: remove NestedKeyOf type * chore: peek overview keyboard accessibility improvement --------- Co-authored-by: Aaryan Khandelwal --- web/components/issues/peek-overview/view.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/components/issues/peek-overview/view.tsx b/web/components/issues/peek-overview/view.tsx index aa7bd395f..c3ac1495a 100644 --- a/web/components/issues/peek-overview/view.tsx +++ b/web/components/issues/peek-overview/view.tsx @@ -58,7 +58,9 @@ export const IssueView: FC = observer((props) => { } }); const handleKeyDown = () => { - if (!isAnyModalOpen) { + const slashCommandDropdownElement = document.querySelector("#slash-command"); + const dropdownElement = document.activeElement?.tagName === "INPUT"; + if (!isAnyModalOpen && !slashCommandDropdownElement && !dropdownElement) { removeRoutePeekId(); const issueElement = document.getElementById(`issue-${issueId}`); if (issueElement) issueElement?.focus();