[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 <aaryankhandu123@gmail.com>
This commit is contained in:
Anmol Singh Bhatia 2024-03-06 19:17:50 +05:30 committed by GitHub
parent c08d6987d0
commit 66f2492e60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,7 +58,9 @@ export const IssueView: FC<IIssueView> = 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();