Hey all,
I’ve noticed a strange issue on Internet Explorer 10.
It happens when you add/ remove a focus class via JavaScript. The placeholder text is misaligned vertically.
This does not happen if you use a focus selector. Unfortunately I can’t use this approach.
Here is an example:
JavaScript:
var input = document.querySelector('input');
input.addEventListener('click', function () {
this.classList.add('inputFocus');
});
input.addEventListener('blur', function () {
this.classList.remove('inputFocus');
});
CSS:
body {
padding-top: 20px;
}
input {
padding: 11px 11px 11px 44px;
}
.inputFocus {
margin-top: -10px;
padding: 21px 11px 21px 44px;
}
HTML:
<input type="text" placeholder="Search..." />
```
Cheers!