Created
December 1, 2016 03:48
-
-
Save maxp/d9d34f608c1eacc36ce0c2abed81b79f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commentArea.addEventListener('keydown', autosize); | |
function autosize () { | |
var el = this; | |
setTimeout(function () { | |
el.style.cssText = 'height:auto;'; | |
el.style.cssText = 'height:' + el.scrollHeight + 'px'; | |
}, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment