Topic: chrome autofill overlapping labels
Ungr pro answered 6 years ago
Piotr Glejzer staff answered 6 years ago
<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 6 years ago
i open ticket to vue category thanks you
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- 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