File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import clickOutMixin from './click-out'
8
8
import focusInMixin from './focus-in'
9
9
10
10
// Return an Array of visible items
11
- function filterVisible ( els ) {
11
+ function filterVisibles ( els ) {
12
12
return ( els || [ ] ) . filter ( isVisible )
13
13
}
14
14
@@ -189,6 +189,7 @@ export default {
189
189
190
190
// Are we in a navbar ?
191
191
if ( isNull ( this . inNavbar ) && this . isNav ) {
192
+ // We should use an injection for this
192
193
/* istanbul ignore next */
193
194
this . inNavbar = Boolean ( closest ( '.navbar' , this . $el ) )
194
195
}
@@ -381,7 +382,8 @@ export default {
381
382
} ,
382
383
// Keyboard nav
383
384
focusNext ( evt , up ) {
384
- if ( ! this . visible ) {
385
+ if ( ! this . visible || ( evt && closest ( Selector . FORM_CHILD , evt . target ) ) ) {
386
+ // Ignore key up/down on form elements
385
387
/* istanbul ignore next: should never happen */
386
388
return
387
389
}
@@ -414,7 +416,7 @@ export default {
414
416
} ,
415
417
getItems ( ) {
416
418
// Get all items
417
- return filterVisible ( selectAll ( Selector . ITEM_SELECTOR , this . $refs . menu ) )
419
+ return filterVisibles ( selectAll ( Selector . ITEM_SELECTOR , this . $refs . menu ) )
418
420
} ,
419
421
focusMenu ( ) {
420
422
this . $refs . menu . focus && this . $refs . menu . focus ( )
You can’t perform that action at this time.
0 commit comments