jackmoore / autosize

Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.
http://www.jacklmoore.com/autosize/
MIT License
5.1k stars 702 forks source link

NS_ERROR_FAILURE in Firefox / Firebug #100

Closed jasonaward closed 11 years ago

jasonaward commented 11 years ago

When attempting to apply autosize to a hidden textarea, I'm receiving the error NS_ERROR_FAILURE on the line of code:

ta.setSelectionRange(cursorIndex,cursorIndex);

It appears to be very similar to this issue (which includes an appropriate fix):

https://github.com/digitalBush/jquery.maskedinput/issues/34

Thanks for any assistance you can provide.

jackmoore commented 11 years ago

An update I made a couple days ago that was responsible for this. Another user mentioned this problem, but since I couldn't reproduce it I assumed it was due to something unrelated.

It's bad enough that a specific workaround needed for chrome was slowing down other browsers (very minor), but now it's responsible for this issue and issue #99. I just committed and update so that the workaround exclusively targets chrome so other browsers don't have to be burdened.