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

Textarea doesn't shrink after clearing on iphone 5 #297

Open pndparade opened 8 years ago

pndparade commented 8 years ago

Sorry, if I didn't notice the solution. Your plugin works great on any device exept iphone (i tried on iphone 5). How can I fix it? I use this coge

$('.textarea-resize').each(function(){
      autosize(this);
})
Demitrius commented 7 years ago

Same on iPhone 4s

jackmoore commented 7 years ago

Sorry for letting this languish, I don't have a way of testing older versions of Safari. It sounds like a bug with how that version of Safari batched layout updates, so that when Autosize resets the textarea height in order to see what the scroll height would be, Safari had not actually triggered updated the layout to reflect that change, leading to an incorrect measurement. It's not obvious to me how that would be worked around.