Former-commit-id: c41fe7b11092a9fb5e82c46cd4bb6c477462bfdb
This commit is contained in:
Henrique Dias
2017-01-02 18:49:13 +00:00
parent fa5387b141
commit 57dd01cb37
3 changed files with 105 additions and 10 deletions

View File

@@ -4,8 +4,9 @@ var editor = {};
editor.textareaAutoGrow = function() {
let autogrow = function() {
this.style.height = '5px';
this.style.height = this.scrollHeight + 'px';
console.log(this.style.height)
this.style.height = 'auto';
this.style.height = (this.scrollHeight) + 'px';
}
let textareas = document.getElementsByTagName('textarea');