Vuetify: [Bug Report] Pressing ENTER inside a select submits the form.

Created on 28 Aug 2018  路  11Comments  路  Source: vuetifyjs/vuetify

Versions and Environment

Vuetify: 1.2.0
Vue:
Browsers:
OS:

Previously worked in:

Vuetify: 1.1.13
Vue:

Steps to reproduce

Place a combobox inside a form with a submit button.

Expected Behavior

Pressing enter creates a new item and does not submit the form.

Actual Behavior

Pressing enter submits the form.

Reproduction Link

https://codepen.io/SeregPie/pen/rZLQRm


Additional Comments:

Worked fine before I updated to 1.2.0.

VSelect regression

Most helpful comment

Can be reproduced in the latest version v1.3.7. Is there somehow a workaround on this?

All 11 comments

This applies to v-select and v-autocomplete too.

Can't reproduce it in 1.3.0

Can be reproduced in the latest version v1.3.7. Is there somehow a workaround on this?

No current work around to my knowledge.

for now, I am using

, at least it doesn't have any strange behaviour

Found a workaround (albeit last week). Just add @keydown.enter.native.prevent to v-autocomplete.

After more looking into this, I believe this might be expected behavior. The same thing will happen if you use a regular text input. https://codepen.io/johnjleider/pen/ZZERRV?editors=1010

@johnleider I tested the default behavior of a select and they actually diverge. https://codepen.io/tomrb/pen/MWayMNV

I find very useful to open the dropdown with enter when navigating with the keyboard :+1:

Looks like this was fixed at some point, it doesn't happen any more in v1.5.24 or v2.3.2: https://codepen.io/kaelwd/pen/NWxvXMq?editors=1010

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alterhu2020 picture alterhu2020  路  3Comments

aaronjpitts picture aaronjpitts  路  3Comments

ricardovanlaarhoven picture ricardovanlaarhoven  路  3Comments

Antway picture Antway  路  3Comments

milleraa picture milleraa  路  3Comments