chrome autofill overlapping labels


Topic: chrome autofill overlapping labels

Dillonv asked 6 years ago

previous ticket Has this been resolved, link is previous ticket... when logging in, chrome auto-fill overlaps labels  

Piotr Glejzer staff answered 6 years ago

Hi, Here is a solution proposed by Rehman on that link Issue. Can you check this?
<div class="md-form">

<input type="email" id="materialLoginFormEmail" class="form-control" onfocus="onEnter(this)" onblur="onExit(this)">

<label for="materialLoginFormEmail">E-mail</label>

</div>
function onEnter(element) {
if ((element.value !==undefined&& element.value.length >=0) ||$(this).attr('placeholder') !==null) {
element.parentNode.querySelector("label").classList.add("active");
}
}

function onExit(element) {
if ((element.value !==undefined&& element.value.length ==0) ||$(this).attr('placeholder') ===null) {
element.parentNode.querySelector("label").classList.remove("active");
}
}


Best, Piotr

mantul answered 6 years ago

how to fix this issue for vuejs? thanks


Magdalena Dembna staff premium commented 6 years ago

Hi, Can you provide a screenshot so I could recreate your issue? Kind regards, Magdalena


mantul commented 5 years ago

i open ticket to vue category thanks you


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.10
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes