Vuetify Version: 2.0.13
Vue Version: 2.6.10
Browsers: Chrome 76.0.3809.132
OS: Android 9, Windows
garrow down to select the first option Gamingenter1 chip is added: Gaming
2 chips are added: Gaming and g
workaround: https://github.com/vuetifyjs/vuetify/issues/8842#issuecomment-528250028
Work around does not work for autocomplete
@rcreynolds53 could you provide a repro for that?
@sh7dm
So the steps I took to reproduce it
Observe that the event fires twice
I was able to fix this by specifying that the :attached="False" on the v-autocomplete, now it only fires adds one of the items not two
@rcreynolds53 please open an issue, this seems to be a new bug.
The workaround suggested in https://github.com/vuetifyjs/vuetify/issues/8842#issuecomment-528250028 stopped working starting for this with Vuetify 2.0.19 (2.0.18 vs 2.0.19).
The workaround still works for https://github.com/vuetifyjs/vuetify/issues/8842, but not for https://github.com/vuetifyjs/vuetify/issues/8841 anymore. The text field is still cleared, but too late, both input events already happened.
@sh7dm Please kindly remove has workaround label as it is no longer applied.
My findings for a real fix:
g, navigate to Gaming with arrow keysenterVCombobox.onKeyDown() (VCombobox:115)Gaming)VSelect.onKeyDown()VMenu.changeListIndex()VListItem.click()$emit('click')genTile(), VSelectList:149): $emit('select')selectItem("Gaming"), VCombobox:153): VAutocomplete.selectItem("Gaming")VSelect.selectItem("Gaming")VCombobox.setValue(["Gaming"])VSelect.setValue(["Gaming"])this.internalValue = ["Gaming"]internalValue = ["Gaming"], searchValue = "g", internalSearch = "g", but selectedItems = [] and the input field still displays only gVCombobox.onEnterDown()$nextTick()internalValue = ["Gaming"], searchValue = "g", internalSearch = "g", selectedItems = ["Gaming"] and the input field displays the Gaming chip and gVCombobox.updateSelf()VCombobox.updateTags()internalSearch = "g")VCombobox.selectItem("g")VAutocomplete.selectItem("g")VSelect.selectItem("g")VCombobox.setValue(["Gaming", "g"])VSelect.setValue(["Gaming", "g"])this.internalValue = ["Gaming", "g"]As soon as I find a proper way of resetting the searchValue/internalSearch without breaking anything I will create another PR
I've found a solution to restore the behavior of vuetify 1.5.18 (see this fiddle: https://jsfiddle.net/wqb0cj28/), where after pressing enter only the selected menu item was added as a chip, but the search value was not cleared.
The workaround by manually resetting the search value also worked back then: https://jsfiddle.net/d90mpot2/
If this behavior is close enough to a fix i will create a PR tomorrow, otherwise I will further look for a solution which also resets the search value
PS: Opinions of @johnleider @nekosaur @sh7dm @jacekkarczmarczyk @MajesticPotatoe on this are very appreciated
Duplicate of #6697
If you have any additional questions, please reach out to us in our Discord community.
Most helpful comment
The workaround suggested in https://github.com/vuetifyjs/vuetify/issues/8842#issuecomment-528250028 stopped working starting for this with Vuetify 2.0.19 (2.0.18 vs 2.0.19).
The workaround still works for https://github.com/vuetifyjs/vuetify/issues/8842, but not for https://github.com/vuetifyjs/vuetify/issues/8841 anymore. The text field is still cleared, but too late, both input events already happened.