Update compose.tpl

Corrected indentation
This commit is contained in:
loma-one 2024-08-03 07:41:59 +02:00 committed by GitHub
parent 974c8fad9b
commit da293cfbd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -103,13 +103,17 @@
</div> </div>
<script> <script>
dzFactory.setupDropzone('#dropzone-{{$id}}', 'comment-edit-text-{{$id}}'); dzFactory.setupDropzone('#dropzone-{{$id}}', 'comment-edit-text-{{$id}}');
document.addEventListener("DOMContentLoaded", function() { document.addEventListener("DOMContentLoaded", function() {
var textareas = document.querySelectorAll(".expandable-textarea"); var textareas = document.querySelectorAll(".expandable-textarea");
textareas.forEach(function(textarea) { textareas.forEach(function(textarea) {
textarea.addEventListener("input", function() { textarea.addEventListener("input", function() {
this.style.height = "auto"; this.style.height = "auto";
this.style.height = (this.scrollHeight) + "px"; this.style.height = (this.scrollHeight) + "px";
}); });
// Set initial height
textarea.style.height = "auto"; textarea.style.height = "auto";
textarea.style.height = (textarea.scrollHeight) + "px"; textarea.style.height = (textarea.scrollHeight) + "px";
}); });