New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<input>'s don't resize on IE #9
Comments
This is a known issue and doesn't only affect inputs with placeholders. Check the Browser Support Notes. |
…a too for proper scaling of inputs on IE. Fixes LeaVerou#9
@LeaVerou yeah the placeholder mention was an oversight from me, so I fixed the title earlier. Anyway, oh dang. I just pushed a commit on my fork of scretchy that fixes this for IE9-11 + Edge. I am not super happy with it but it does work. Can't believe I missed that mention about the polyfill, I am sure that I am going blind these days 🍔 |
…a too for proper scaling of inputs on IE. Fixes LeaVerou#9
|
|
Yay, yet another IE bug (tested with Microsoft Edge, IE11, IE11 Mobile, most likely affects all of them).
When calculating the placeholder width on stretchy.js#L76
the problem is that
element.scrollLeft
never actually updates on<input>
-elements on IE, which results to the inputs beingoffset
wide forever:There's an workaround for Safari above that line, but like I said, I think the value of
scrollLeft
stays 0 forever no matter what so I think any workarounds usingscrollLeft
are out of the picture for an IE fix.The popular[1] workaround[2] is to use
<textarea>s
with single rows forced instead, but that doesn't really apply to Scretchy as the whole point is to have a variety of autosizing form elements instead of just going "screw it, just use<textarea>
for everything" 🔨The text was updated successfully, but these errors were encountered: