Skip to content

Commit

Permalink
fix: prevent drilldown kbd navigation when editing input field (#4576)
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnyama authored Aug 26, 2024
1 parent d415c37 commit 6201698
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ const toggleNavigationMenu = (
};
function handleKeyNavigation(event: KeyboardEvent) {
const target = event.target as HTMLElement;
if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {
return; // Prevent navigation if the user is editing text
}
if (event.shiftKey && event.key === 'ArrowLeft') {
toggleNavigationMenu(event, upstreamMenu.value, props.upstreamOperatorsNav, leftChevronButton.value);
} else if (event.shiftKey && event.key === 'ArrowRight') {
Expand Down

0 comments on commit 6201698

Please sign in to comment.