bgrins / ExpandingTextareas

jQuery plugin for elegant expanding textareas
http://bgrins.github.com/ExpandingTextareas/
MIT License
260 stars 73 forks source link

Take max height from textarea CSS property. #40

Closed Serhioromano closed 10 years ago

domchristie commented 10 years ago

@Serhioromano OK. So to bring back the discussion to the pull request (rather than line-notes).

The tests you’ve written look good, I just feel that we should be testing the outerHeight properties of the textarea and clone, so that the clone accurately mimics the textarea.

When I updated the tests (with outerHeight) and ran them in Chrome, Firefox, and IE10, they all passed. Are you able to get the outerHeight test to fail? If so, on what browser?

Serhioromano commented 10 years ago

I test like this

equal($textarea.outerHeight(), $textarea.siblings('pre').height());

And I get

2014-02-28_10-57-13

On Chrome MAC OS X Maverick.

But Safari and Firefox works nice.

domchristie commented 10 years ago

If you compare both outerheight()s, it should pass:

equal($textarea.outerHeight(), $textarea.siblings('pre').outerHeight());
bgrins commented 10 years ago

Fixed by #42. Thanks @Serhioromano and @domchristie