Skip to content

Commit

Permalink
fix multiple resizes in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshub16 committed Apr 11, 2017
1 parent 424a6cb commit e924727
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ var hashto;
var inElem = document.getElementById("in");

function update(e){
inElem.style.height = document.getElementById('code').innerText.split('\n').length * window.getComputedStyle(inElem).getPropertyValue("line-height").replace('px', '')*1.5 + 50 +'px';


setOutput(e.getValue());

// clearTimeout(hashto);
Expand Down Expand Up @@ -58,6 +59,7 @@ function setOutput(val){
return;
}
}

inElem.style.height = inElem.innerText.split('\n').length * window.getComputedStyle(inElem).getPropertyValue("line-height").replace('px', '')*1.5 + 50 +'px';
}

Expand Down

0 comments on commit e924727

Please sign in to comment.