Skip to content

Commit 02ae7ac

Browse files
authored
Update dropdown.js
1 parent 2e98f4a commit 02ae7ac

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/mixins/dropdown.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Popper from 'popper.js'
22
import BvEvent from '../utils/bv-event.class'
33
import KeyCodes from '../utils/key-codes'
44
import warn from '../utils/warn'
5-
import { closest, contains, getAttr, isVisible, selectAll } from '../utils/dom'
5+
import { closest, contains, isVisible, selectAll } from '../utils/dom'
66
import { isNull } from '../utils/inspect'
77
import clickOutMixin from './click-out'
88
import focusInMixin from './focus-in'
@@ -13,7 +13,6 @@ function filterVisibles(els) {
1313
}
1414

1515
// Dropdown item CSS selectors
16-
// TODO: .dropdown-form handling
1716
const Selector = {
1817
FORM_CHILD: '.dropdown form',
1918
ITEM_SELECTOR: '.dropdown-item:not(.disabled):not([disabled])'
@@ -410,7 +409,7 @@ export default {
410409
},
411410
focusItem(idx, items) {
412411
let el = items.find((el, i) => i === idx)
413-
if (el && getAttr(el, 'tabindex') !== '-1') {
412+
if (el && el.focus) {
414413
el.focus()
415414
}
416415
},

0 commit comments

Comments
 (0)