3

My previously simple textarea expander is now causing problems.

$(document).on('keyup', 'textarea',function(){
        $(this).height($(this).prop('scrollHeight'));
    });

Works fine on Firefox but on webkit browsers keeps increasing the text-area in size on every key press whether it needs to or now.

Walrus
  • 19,801
  • 35
  • 121
  • 199

1 Answers1

7

Looks like you're looking for this. http://www.jacklmoore.com/autosize

Adam Merrifield
  • 10,307
  • 4
  • 41
  • 58