editor: auto size textarea and stretch their label

This commit is contained in:
jean-emmanuel 2017-03-14 18:51:19 +01:00
parent c28261211c
commit 19d760aa1c
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ var editObject = function(container, data, refresh){
} else if (i == 'layout') {
input = $(`<textarea data-type="${type}" title="${i}" rows="1">${value}</textarea>`)
input = $(`<textarea data-type="${type}" title="${i}" rows="${value.split('\n').length}">${value}</textarea>`)
input.on('input focus', function(){
if (this.scrollHeight==0) return
this.style.height = 'auto'