Skip to content
Snippets Groups Projects
Commit aaf18e0e authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by Jan-Hendrik Willms
Browse files

blubber: compute height without padding so that the textarea won't grow...

Closes #4413

Merge request studip/studip!3276
parent ccabc66b
No related branches found
No related tags found
No related merge requests found
......@@ -121,8 +121,11 @@ export default {
},
setTextareaSize() {
const textarea = this.$refs.textarea;
const style = getComputedStyle(textarea);
const height = textarea.scrollHeight - parseInt(style.paddingTop, 10) - parseInt(style.paddingBottom, 10);
textarea.style.width = this.commentWidth + 'px';
textarea.style.height = textarea.scrollHeight + 'px';
textarea.style.height = height + 'px';
}
},
mounted() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment