|
52 | 52 | @blur="softFocus = false" |
53 | 53 | @keyup="managePlaceholder" |
54 | 54 | @keydown="resetInputState" |
55 | | - @keydown.down.prevent="navigateOptions('next')" |
56 | | - @keydown.up.prevent="navigateOptions('prev')" |
| 55 | + @keydown.down.prevent="handleNavigate('next')" |
| 56 | + @keydown.up.prevent="handleNavigate('prev')" |
57 | 57 | @keydown.enter.prevent="selectOption" |
58 | 58 | @keydown.esc.stop.prevent="visible = false" |
59 | 59 | @keydown.delete="deletePrevTag" |
|
84 | 84 | @focus="handleFocus" |
85 | 85 | @blur="handleBlur" |
86 | 86 | @input="debouncedOnInputChange" |
87 | | - @keydown.native.down.stop.prevent="navigateOptions('next')" |
88 | | - @keydown.native.up.stop.prevent="navigateOptions('prev')" |
| 87 | + @keydown.native.down.stop.prevent="handleNavigate('next')" |
| 88 | + @keydown.native.up.stop.prevent="handleNavigate('prev')" |
89 | 89 | @keydown.native.enter.prevent="selectOption" |
90 | 90 | @keydown.native.esc.stop.prevent="visible = false" |
91 | 91 | @keydown.native.tab="visible = false" |
| 92 | + @compositionstart="handleComposition" |
| 93 | + @compositionupdate="handleComposition" |
| 94 | + @compositionend="handleComposition" |
92 | 95 | @mouseenter.native="inputHovering = true" |
93 | 96 | @mouseleave.native="inputHovering = false"> |
94 | 97 | <template slot="prefix" v-if="$slots.prefix"> |
|
440 | 443 | }, |
441 | 444 |
|
442 | 445 | methods: { |
| 446 | + handleNavigate(direction) { |
| 447 | + if (this.isOnComposition) return; |
| 448 | +
|
| 449 | + this.navigateOptions(direction); |
| 450 | + }, |
443 | 451 | handleComposition(event) { |
444 | 452 | const text = event.target.value; |
445 | 453 | if (event.type === 'compositionend') { |
|
0 commit comments