Skip to content

Commit

Permalink
feat: don't allow dropdown navigation on input focused (#9341)
Browse files Browse the repository at this point in the history
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
  • Loading branch information
scmmishra and iamsivin committed May 2, 2024
1 parent 94e1d55 commit 7f8ac37
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions app/javascript/shared/components/ui/dropdown/DropdownMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,8 @@ export default {
getKeyboardEvents() {
const menuButtons = this.dropdownMenuButtons();
return {
ArrowUp: {
action: e => {
e.preventDefault();
this.focusPreviousButton(menuButtons);
},
allowOnFocusedInput: true,
},
ArrowDown: {
action: e => {
e.preventDefault();
this.focusNextButton(menuButtons);
},
allowOnFocusedInput: true,
},
ArrowUp: () => this.focusPreviousButton(menuButtons),
ArrowDown: () => this.focusNextButton(menuButtons),
};
},
focusPreviousButton(menuButtons) {
Expand Down

0 comments on commit 7f8ac37

Please sign in to comment.