lock pre size
pre { resize: none; }
Source: stackoverflow.com
fix pre size
resize: none;
make pre auto height
function autoResize() { console.log('resizing'); textInput.style.height = (textInput.scrollHeight) + 'px'; }