File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -464,6 +464,8 @@ export default {
464
464
if ( this . blockKeys . indexOf ( key ) !== - 1 || this . disabled || option . $isLabel || option . $isDisabled ) return
465
465
/* istanbul ignore else */
466
466
if ( this . max && this . multiple && this . internalValue . length === this . max ) return
467
+ /* istanbul ignore else */
468
+ if ( key === 'Tab' && ! this . pointerDirty ) return
467
469
if ( option . isTag ) {
468
470
this . $emit ( 'tag' , option . label , this . id )
469
471
this . search = ''
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ export default {
2
2
data ( ) {
3
3
return {
4
4
pointer : 0 ,
5
+ pointerDirty : false ,
5
6
visibleElements : this . maxHeight / this . optionHeight
6
7
}
7
8
} ,
@@ -28,6 +29,9 @@ export default {
28
29
watch : {
29
30
filteredOptions ( ) {
30
31
this . pointerAdjust ( )
32
+ } ,
33
+ isOpen ( ) {
34
+ this . pointerDirty = false
31
35
}
32
36
} ,
33
37
methods : {
@@ -55,6 +59,7 @@ export default {
55
59
/* istanbul ignore else */
56
60
if ( this . filteredOptions [ this . pointer ] . $isLabel ) this . pointerForward ( )
57
61
}
62
+ this . pointerDirty = true
58
63
} ,
59
64
pointerBackward ( ) {
60
65
if ( this . pointer > 0 ) {
@@ -69,6 +74,7 @@ export default {
69
74
/* istanbul ignore else */
70
75
if ( this . filteredOptions [ 0 ] . $isLabel ) this . pointerForward ( )
71
76
}
77
+ this . pointerDirty = true
72
78
} ,
73
79
pointerReset ( ) {
74
80
/* istanbul ignore else */
@@ -89,6 +95,7 @@ export default {
89
95
} ,
90
96
pointerSet ( index ) {
91
97
this . pointer = index
98
+ this . pointerDirty = true
92
99
}
93
100
}
94
101
}
You can’t perform that action at this time.
0 commit comments