Skip to content

bug: browser autofill background color overlaps input label  #27812

Description

@legendar

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

In v7.1.3 auto-filled inputs still overlap their floating labels. The original issue was closed by BOT: #18141 but it still is not fixed in 7.x

Expected Behavior

As for non-autofilled inputs, floating labels must stay entirely visible.

Steps to Reproduce

An ion-item containing a floating ion-label and an ion-input that is auto-fillable and auto-filled.

Code Reproduction URL

https://github.com/legendar/ion-input-label-issue

Ionic Info

$ ionic info

Ionic:

Ionic CLI : 7.1.1 (/home/****/.config/yarn/global/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 7.1.3

Capacitor:

Capacitor CLI : 4.7.3
@capacitor/android : 4.7.3
@capacitor/core : 4.7.3
@capacitor/ios : 4.7.3

Utility:

cordova-res : not installed globally
native-run : 1.7.2

System:

NodeJS : v18.15.0 (/home/****/.nvm/versions/node/v18.15.0/bin/node)
npm : 9.5.0
OS : Linux 5.10

Additional Information

image

possible workaround:

 .label-text-wrapper {
    z-index: 2;
  }

  .label-text-wrapper {
    transform: translateY(50%) scale(0.75) translateY(14px) !important;
    padding: 0 2px !important;
  }

  input {
    min-height: 50px;
    padding: 14px 2px 0 !important;
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions