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'

View file

@ -7,7 +7,7 @@
margin-top: -1rem;
// box-shadow: 0 0 0 1 var(--color-bg);
background:var(--color-bg);
align-items: flex-start;
align-items: stretch;
z-index: 1;
border-bottom: 1rem solid var(--color-bg);