Vuetify: [Bug Report] V-autocomplete (when inside a v-menu) focusing next autocomplete when enter key is pressed to select option

Created on 12 Feb 2020  路  1Comment  路  Source: vuetifyjs/vuetify

Environment

Vuetify Version: 2.2.12
Vue Version: 2.6.10
Browsers: Chrome 80.0.3987.100
OS: Windows 10

Steps to reproduce

  • Create a collection of V-AutoCompletes inside V-Menu
  • Populate with data
  • Click an autocomplete
  • Select an option with arrow keys
  • Press Enter
  • The next autocomplete will then be focused

Expected Behavior

The item is selected and the v-model is set to the selected item.

Actual Behavior

The item is selected, but the next autocomplete is then focused

Reproduction Link

https://codesandbox.io/s/vuetify-template-gmozt

Other comments

I have included a potential work around to the problem inside the code sandbox in the mounted hook of the AutoCompleteExample component. Essentially setting the hasFocused and menuIsBooted in the AutoComplete and isBooted in the menu component to true inside mounted lifecycle hook. Uncommenting this fix will make the component work as expected.

Update:
When playing around with this more. I found changing the attributes on v-autocomplete are not needed, just changing menu.IsBooted to true fixes the issue.

VAutocomplete bug

Most helpful comment

Workaround: <v-autocomplete menu-props="eager"

>All comments

Workaround: <v-autocomplete menu-props="eager"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aaronjpitts picture aaronjpitts  路  3Comments

Antway picture Antway  路  3Comments

gluons picture gluons  路  3Comments

Webifi picture Webifi  路  3Comments

cawa-93 picture cawa-93  路  3Comments