summaryrefslogtreecommitdiff
path: root/public/js/modules/event-edit.js
diff options
context:
space:
mode:
authorRaphael Kabo <raphaelkabo@hey.com>2024-05-26 18:59:18 +0100
committerRaphael Kabo <raphaelkabo@hey.com>2024-05-26 18:59:18 +0100
commit9abb82166c8ad2b5bce6627390a7d8b3d5841695 (patch)
tree13b149906b4c2886ad43e5997e69a4fd416505ae /public/js/modules/event-edit.js
parente5a2f1ae6f6c1341e02d2f24a14f8f374a2e61a8 (diff)
Fix textarea resize in edit modals
Diffstat (limited to 'public/js/modules/event-edit.js')
-rw-r--r--public/js/modules/event-edit.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/public/js/modules/event-edit.js b/public/js/modules/event-edit.js
index 736547f..6d2c216 100644
--- a/public/js/modules/event-edit.js
+++ b/public/js/modules/event-edit.js
@@ -7,7 +7,6 @@ $(document).ready(function () {
label_selected: "Change file",
no_label: false,
});
- autosize($("textarea"));
if (window.eventData.image) {
$("#event-image-preview").css(
"background-image",
@@ -18,6 +17,16 @@ $(document).ready(function () {
}
});
+$('#editModal').on('shown.bs.modal', function (e) {
+ console.log('hii');
+ const ta = document.querySelector("#editModal textarea");
+ ta.style.display = 'none';
+ autosize(ta);
+ ta.style.display = '';
+ // Call the update method to recalculate the size:
+ autosize.update(ta);
+});
+
function editEventForm() {
return {
data: {