| | |
| | | @blur="softFocus = false" |
| | | @keyup="managePlaceholder" |
| | | @keydown="resetInputState" |
| | | @keydown.down.prevent="navigateOptions('next')" |
| | | @keydown.up.prevent="navigateOptions('prev')" |
| | | @keydown.down.prevent="handleNavigate('next')" |
| | | @keydown.up.prevent="handleNavigate('prev')" |
| | | @keydown.enter.prevent="selectOption" |
| | | @keydown.esc.stop.prevent="visible = false" |
| | | @keydown.delete="deletePrevTag" |
| | |
| | | @focus="handleFocus" |
| | | @blur="handleBlur" |
| | | @input="debouncedOnInputChange" |
| | | @keydown.native.down.stop.prevent="navigateOptions('next')" |
| | | @keydown.native.up.stop.prevent="navigateOptions('prev')" |
| | | @keydown.native.down.stop.prevent="handleNavigate('next')" |
| | | @keydown.native.up.stop.prevent="handleNavigate('prev')" |
| | | @keydown.native.enter.prevent="selectOption" |
| | | @keydown.native.esc.stop.prevent="visible = false" |
| | | @keydown.native.tab="visible = false" |
| | | @compositionstart="handleComposition" |
| | | @compositionupdate="handleComposition" |
| | | @compositionend="handleComposition" |
| | | @mouseenter.native="inputHovering = true" |
| | | @mouseleave.native="inputHovering = false"> |
| | | <template slot="prefix" v-if="$slots.prefix"> |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | handleNavigate(direction) { |
| | | if (this.isOnComposition) return; |
| | | |
| | | this.navigateOptions(direction); |
| | | }, |
| | | handleComposition(event) { |
| | | const text = event.target.value; |
| | | if (event.type === 'compositionend') { |
| | |
| | | handleFocus(event) { |
| | | if (!this.softFocus) { |
| | | if (this.automaticDropdown || this.filterable) { |
| | | this.visible = true; |
| | | if (this.filterable) { |
| | | if (this.filterable && !this.visible) { |
| | | this.menuVisibleOnFocus = true; |
| | | } |
| | | this.visible = true; |
| | | } |
| | | this.$emit('focus', event); |
| | | } else { |