Vuetify: [Feature Request] Don't focus on text-field after clearing it

Created on 24 May 2018  路  8Comments  路  Source: vuetifyjs/vuetify

Problem to solve

On mobile devices it is annoying that the soft keyboard pops up after hitting the clear button of a clearable text-field.

Proposed solution

Make an option to not focus upon clearing the text-field.

VTextField

Most helpful comment

Another case where it would be nice:
https://codepen.io/anon/pen/wxxoYX?editors=1000

Textfield is readonly so it shouldn't be focused after clearing

All 8 comments

You can implement this yourself with the append-icon prop and @click:append event.

Feels more like a workaround ...

@KaelWD how about clearable="nofocus"? This could also support other features like clearable="noopen" or combined clearable="noopen,nofocus". I agree that using append-icon is more like workaround than proper solution

@jacekkarczmarczyk I like that. Parametrising clearable seems intuitive here.

We could do that, but what's the use case? I imagine that the vast majority of the time, a cleared field will by typed in straight away. A small workaround is acceptable in this case instead of complicating the massive api we already have.

The problem with this workaround is that you can't use append-icon and clearable together

Another case where it would be nice:
https://codepen.io/anon/pen/wxxoYX?editors=1000

Textfield is readonly so it shouldn't be focused after clearing

While I can't speak to the suggested implementations within this thread, I do believe it is worth further discussion.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

milleraa picture milleraa  路  3Comments

dschreij picture dschreij  路  3Comments

jofftiquez picture jofftiquez  路  3Comments

alterhu2020 picture alterhu2020  路  3Comments

smousa picture smousa  路  3Comments