-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report] Combobox add 2 items when pressing enter on a search item #8841
Comments
workaround: #8842 (comment) |
Work around does not work for autocomplete |
@rcreynolds53 could you provide a repro for that? |
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 #8842 (comment) stopped working starting for this with Vuetify 2.0.19 (2.0.18 vs 2.0.19). The workaround still works for #8842, but not for #8841 anymore. The text field is still cleared, but too late, both input events already happened. |
@sh7dm Please kindly remove |
My findings for a real fix:
As soon as I find a proper way of resetting the |
I've found a solution to restore the behavior of vuetify 1.5.18 (see this fiddle: https://jsfiddle.net/wqb0cj28/), where after pressing 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. |
…eyboard (#9866) fixes #6697 * Fix #8841 * Fix indentation * Remove duplicate line of code * Fix VSelect test After triggering `click` the `VMenu` needs one tick to activate, therefore the `keydown.down` event during the same tick will be passed to the still inactive menu und not update the `listIndex`. Waiting for the next tick fixes this as the menu will be active afterwards * Prevent VCombobox selection by keyboard from triggering twice * Revert "Fix VSelect test" This reverts commit 86fefaa. * style(VCombobox): Pass `updateSelf` to `$nextTick` instead of arrow function This was suggested by @jacekkarczmarczyk ([comment](https://github.com/vuetifyjs/vuetify/pull/9866/files/ba3f8a40b327e7509272530fe40ffe726f016a02#r359313120)) * test(VCombobox): Add test case for changes
Environment
Vuetify Version: 2.0.13
Vue Version: 2.6.10
Browsers: Chrome 76.0.3809.132
OS: Android 9, Windows
Steps to reproduce
g
arrow down
to select the first optionGaming
enter
Expected Behavior
1 chip is added:
Gaming
Actual Behavior
2 chips are added:
Gaming
andg
Reproduction Link
https://codepen.io/gotson/pen/GRKOoeb
The text was updated successfully, but these errors were encountered: