diff --git a/app/javascript/dashboard/components/widgets/forms/PhoneInput.vue b/app/javascript/dashboard/components/widgets/forms/PhoneInput.vue index 53102ebfd..e43db96e1 100644 --- a/app/javascript/dashboard/components/widgets/forms/PhoneInput.vue +++ b/app/javascript/dashboard/components/widgets/forms/PhoneInput.vue @@ -227,15 +227,25 @@ export default { getKeyboardEvents() { return { ArrowUp: { - action: this.moveUp, + action: e => { + e.preventDefault(); + console.log('ArrowUp in PhoneInput'); + this.moveUp(); + }, allowOnFocusedInput: true, }, ArrowDown: { - action: this.moveDown, + action: e => { + e.preventDefault(); + console.log('ArrowDown in PhoneInput'); + this.moveDown(); + }, allowOnFocusedInput: true, }, Enter: { - action: () => { + action: e => { + e.preventDefault(); + console.log('Enter in PhoneInput'); this.onSelectCountry( this.filteredCountriesBySearch[this.selectedIndex] ); diff --git a/app/javascript/dashboard/components/widgets/mentions/mentionSelectionKeyboardMixin.js b/app/javascript/dashboard/components/widgets/mentions/mentionSelectionKeyboardMixin.js index 601e8c5f8..97300aa41 100644 --- a/app/javascript/dashboard/components/widgets/mentions/mentionSelectionKeyboardMixin.js +++ b/app/javascript/dashboard/components/widgets/mentions/mentionSelectionKeyboardMixin.js @@ -22,7 +22,11 @@ export default { getKeyboardEvents() { return { ArrowUp: { - action: this.moveSelectionUp, + action: e => { + this.moveSelectionUp(); + console.log('ArrowUp in mentionSelectionKeyboardMixin'); + e.preventDefault(); + }, allowOnFocusedInput: true, }, 'Control+KeyP': { @@ -33,7 +37,11 @@ export default { allowOnFocusedInput: true, }, ArrowDown: { - action: this.moveSelectionDown, + action: e => { + this.moveSelectionDown(); + console.log('ArrowDown in mentionSelectionKeyboardMixin'); + e.preventDefault(); + }, allowOnFocusedInput: true, }, 'Control+KeyN': { @@ -46,6 +54,7 @@ export default { Enter: { action: e => { this.onSelect(); + console.log('Enter in mentionSelectionKeyboardMixin'); e.preventDefault(); }, allowOnFocusedInput: true, diff --git a/app/javascript/shared/components/ui/dropdown/DropdownMenu.vue b/app/javascript/shared/components/ui/dropdown/DropdownMenu.vue index e7a089481..990155c69 100644 --- a/app/javascript/shared/components/ui/dropdown/DropdownMenu.vue +++ b/app/javascript/shared/components/ui/dropdown/DropdownMenu.vue @@ -37,11 +37,19 @@ export default { const menuButtons = this.dropdownMenuButtons(); return { ArrowUp: { - action: () => this.focusPreviousButton(menuButtons), + action: e => { + e.preventDefault(); + console.log('ArrowUp in Dropdown Menu'); + this.focusPreviousButton(menuButtons); + }, allowOnFocusedInput: true, }, ArrowDown: { - action: () => this.focusNextButton(menuButtons), + action: e => { + console.log('ArrowDown in Dropdown Menu'); + e.preventDefault(); + this.focusNextButton(menuButtons); + }, allowOnFocusedInput: true, }, };