Input mixin ( quasar-framework\src\mixins\input.js) is wrong

  • It seems that in the input mixins files there are error. Example: the focus mixin is defined as below

    methods: {
    focus () {
    if (!this.disable) {

    which assumes that the elements is has a ref “input”. If the user prefers some other name, then element does not get the focus.

    example: I had something like that:

      <q-field v-bind="$attrs" label-width="4">
        <q-input :value="initial" :placeholder="placeholder" @input="input"  hide-underline  ref="query"
                 style="border-color:cadetblue; border-radius:5px;   border-style:solid; border-width:1px">
          <q-autocomplete :value="initial" @search="search" @selected="selected" @input="input"  
                          @show="show" @hide="hide" :min-characters="mincharacters">

    and some where in the code I have


    Since I did not name my q-input as ‘input’ but ‘query’, my element does not get the focus.
    all references to

    needs to be corrected


  • $refs.inputEditName.focus()
    works fine

Log in to reply