Vuetify: [Bug Report] focus() input inside a menu not working

Created on 2 Jul 2018  路  6Comments  路  Source: vuetifyjs/vuetify

Versions and Environment

Vuetify: 1.1.1
Vue: 2.5.16
Browsers: Chrome 67.0.3396.99
OS: Mac OS 10.13.3

Steps to reproduce

click on the "v-menu" button"

Expected Behavior

when I click the "v-menu" button I expect the input to be focused

Actual Behavior

it's not focused

Reproduction Link

https://codepen.io/deiucanta/pen/VdRKJY

VMenu bug

All 6 comments

I don't know why they are difference between v-dialog and v-menu.
And I have a way to solve it. But I think that it isn't the best way.

  1. Watch the v-model variable, if true detect height of element.
  2. If element height isn't 0, call focus and break loop.
  3. I used a loop, it would check 3 times, every time delay 50 ms.

Usually, it just run once. Sometimes it would loop twice or more.
But I think there is a better way to solve it.

I have the same issue. There should be a <v-menu> event on menu open, when all components inside it are visible.

For now here is a workaround: https://codepen.io/johnjleider/pen/mZOqNL?editors=1010

There are quite a few components that could technically benefit from this and unfortunately this is not something that we can get done in time for v2.0.

Any progress on this?

@johnleider Thanks! This is the only solution I found that actually worked!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

efootstep picture efootstep  路  3Comments

ricardovanlaarhoven picture ricardovanlaarhoven  路  3Comments

dohomi picture dohomi  路  3Comments

cawa-93 picture cawa-93  路  3Comments

KuroThing picture KuroThing  路  3Comments