enhancement: Removes the focus of the first item in the dropdown when it is active. (#2833)
This commit is contained in:
parent
70d41ffcdd
commit
0e4196c91a
1 changed files with 0 additions and 10 deletions
|
@ -25,9 +25,6 @@ export default {
|
|||
default: 'top',
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.focusItem();
|
||||
},
|
||||
methods: {
|
||||
dropdownMenuButtons() {
|
||||
return this.$refs.dropdownMenu.querySelectorAll(
|
||||
|
@ -42,13 +39,6 @@ export default {
|
|||
const activeIndex = [...menuButtons].indexOf(focusedButton);
|
||||
return activeIndex;
|
||||
},
|
||||
focusItem() {
|
||||
const firstButton = this.$refs.dropdownMenu.querySelector(
|
||||
'ul.dropdown li.dropdown-menu__item .button'
|
||||
);
|
||||
|
||||
if (firstButton) firstButton.focus();
|
||||
},
|
||||
handleKeyEvents(e) {
|
||||
const menuButtons = this.dropdownMenuButtons();
|
||||
const lastElementIndex = menuButtons.length - 1;
|
||||
|
|
Loading…
Reference in a new issue