Form input autofill background color in Chrome



  • Hi,
    I’m building a form for login. The chrome autofill for email and password is ruining my UI and I googled a lot but to no avail. I took a look at github issues and saw that it was an issue in beta versions and must have been solved. But now I’m using chrome 83 and I have this issue.

    Am I doing something wrong?

    Here is the markup

    <template>
      <q-form @submit.prevent="login" class="q-gutter-md">
        <q-input color="primary" v-model="email" label="Email" />
        <q-input v-model="password" label="Password" :type="hidePass ? 'password' : 'text'">
          <template v-slot:append>
            <q-icon
              :name="hidePass ? 'visibility_off' : 'visibility'"
              class="cursor-pointer"
              @click="hidePass = !hidePass"
            />
          </template>
        </q-input>
        <div class="text-center q-mt-lg">
          <q-btn type="submit" color="primary" class="full-width">Login</q-btn>
        </div>
        <div class="text-center">
          <q-btn text flat no-caps size="small" class="q-mt-sm">Forgot your password?</q-btn>
        </div>
      </q-form>
    </template>
    

    and this is the result

    Screenshot_3.png





  • @metalsadman Thanks for your input. I don’t want to disable autocomplete. It would be inconvenient for users to be unable to use their browser password managers.
    It is actually getting rid of the problem instead of solving it.



  • @ahmadx87, I add:

    $form-autofill = #000000

    to my quasar.variables.styl and this does the trick.



  • @jeffatpf Thanks, good point. It didn’t work though, i think this variable is for older versions of Quasar. I searched the docs variables section. it seems to be $input-autofill-color but it doesn’t work. Something might have been changed in newer versions of chrome or there is a bug in Quasar. Or maybe I’m doing something wrong.



  • HI! I also got the same problem, did you fix it?


Log in to reply