panel: prevent layout input height=0

This commit is contained in:
jean-emmanuel 2017-03-14 18:18:41 +01:00
parent 5333153a94
commit 93a1cb07c8
2 changed files with 2 additions and 2 deletions

View file

@ -74,6 +74,7 @@ var editObject = function(container, data, refresh){
input = $(`<textarea data-type="${type}" title="${i}" rows="1">${value}</textarea>`)
input.on('input focus', function(){
if (this.scrollHeight==0) return
this.style.height = 'auto'
this.style.height = this.scrollHeight + 'px'
})
@ -82,7 +83,6 @@ var editObject = function(container, data, refresh){
input.trigger('change')
}
})
input.trigger('input')
input.appendTo(wrapper)
} else {

View file

@ -70,7 +70,7 @@
background: none;
color:var(--color-text);
width:100%;
height:auto;
height:100%;
padding:5rem;
overflow: hidden;
resize: none;