diff --git a/ext/view/script.js b/ext/view/script.js index 734e7276..667e7253 100644 --- a/ext/view/script.js +++ b/ext/view/script.js @@ -6,9 +6,15 @@ function joinUrlSegments(base, query) { return base + separatorChar + query; } +/** + * @param {HTMLElement} el + */ function autosize(el) { setTimeout(function() { - el.style.cssText = 'height:' + el.scrollHeight + 'px'; + if(el.offsetHeight < el.scrollHeight) { + el.style.height = el.scrollHeight + 'px'; + el.style.width = el.offsetWidth + 'px'; + } }, 0); }