autosize icon indicating copy to clipboard operation
autosize copied to clipboard

Wrong calculated height when box-sizing: border-box on firefox 28-

Open djeremh opened this issue 10 years ago • 1 comments
trafficstars

I ran over an issue specific to firefox 28 and older versions.

It seems there is a wrong implementation on padding in textarea in these browsers. https://bugzilla.mozilla.org/show_bug.cgi?id=157846 It means that scrollHeight is incorrectly calculated (not taking paddings in the calculation).

As you fix the issue if box sizing is padding box, it is not the case when box-sizing: border-box;

Moreover, if i add a min-height to the text area, I had a browser freeze due to the potential endless loop of update() calling changeOverflow() calling update() and so on.

You can test this on https://jsfiddle.net/dyvt9euf/6/ using a firefox 28 or older

I am working on a fix, right now.

djeremh avatar Jul 01 '15 11:07 djeremh

Here is the pull request : https://github.com/jackmoore/autosize/pull/243

djeremh avatar Jul 02 '15 09:07 djeremh