bgrins / ExpandingTextareas

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

Does not work as expected when nested in a table #33

Open brianmhunt opened 10 years ago

brianmhunt commented 10 years ago

When the textarea is in a fixed-width table, it does not work as expected. Here is an example:

http://jsfiddle.net/bmh_ca/4QcaR/

brianmhunt commented 10 years ago

One solution is to apply width: 100% to the <td> that the <textarea> is found in.

brianmhunt commented 10 years ago

Another solution is the application of the following CSS, per this discussion on StackOverflow

td {
    max-width: 0px;
}

However one must note that this is based upon a seemingly undefined behaviour.

A preferable alternative would probably be:

table {
   table-layout: fixed;
}
bgrins commented 10 years ago

Wow, that is strange behavior. I think your research on this would be good to add to the documentation, since everyone's ideal solution will probably differ based on their situation.