editor: force height update on input (prevent scrollbar to hide text)

This commit is contained in:
jean-emmanuel 2017-07-03 20:42:58 +02:00
parent c7d530f1b9
commit db79ef5a0a

View file

@ -71,6 +71,7 @@ var editObject = function(container, data, refresh){
input = $(`<textarea class="input" data-type="${type}" title="${i}" rows="${value.split('\n').length}">${value}</textarea>`)
input.on('input focus', function(){
this.setAttribute('rows',0)
this.setAttribute('rows',input.val().split('\n').length)
})
input.on('keydown', (e)=>{