- commit
- 5aeb97fcfd5da704ea68973c0174430169a9ebb2
- parent
- 0590b22db5acb059dad3bcf2594e85db24723f61
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2021-05-07 06:28
replace resize approach taken from https://projects.verou.me/stretchy/
Diffstat
| M | static/main.js | 7 | ++----- |
1 files changed, 2 insertions, 5 deletions
diff --git a/static/main.js b/static/main.js
@@ -18,11 +18,8 @@ 18 18 }); 19 19 20 20 var resize = function(event) {21 -1 /* 0-timeout to get the already changed text */22 -1 setTimeout(() => {23 -1 this.style.height = 'auto';24 -1 this.style.height = this.scrollHeight + 5 + 'px';25 -1 }, 0);-1 21 this.style.height = '0'; -1 22 this.style.height = this.scrollHeight + this.offsetHeight + 'px'; 26 23 }; 27 24 28 25 on(document, 'input', 'textarea', resize);