Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly set the padding of the textarea to 0
If textareas are styled to have a width of 100%, as well as a non-zero padding, the "invisible" textarea inserted by autosize.js will increase the width of the page by the amount of the padding, resulting in a horizontal scrollbar. This may seem like an edge case, but the popular CSS framework Foundation sets those properties by default as part of their form styling. The fix is to explicitly set the padding of the invisible textarea to 0. I have tested this on my site and it solves the issue without affecting autosize's functionality.
- Loading branch information