Topic: chrome autofill overlapping labels
Dillonv free asked 6 years ago
mantul free answered 5 years ago
how to fix this issue for vuejs? thanks
Magdalena Dembna staff commented 5 years ago
Hi, Can you provide a screenshot so I could recreate your issue? Kind regards, Magdalena
mantul free commented 5 years ago
i open ticket to vue category thanks you
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
Ungr pro answered 6 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: 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