attach dropzone only when opening comment

This commit is contained in:
Jakobus Schürz 2023-03-15 05:52:41 +01:00
parent d39781023e
commit 1a1a1246b6

View File

@ -67,5 +67,8 @@
<script>
Dropzone.autoDiscover = false;
dzFactory.setupDropzone('#dropzone-{{$id}}', $('#comment-edit-text-{{$id}}'), {{$max_imagesize}});
$('[id=comment-{{$id}}]').on('click', function() {
dzFactory.setupDropzone('#dropzone-{{$id}}', $('#comment-edit-text-{{$id}}'), {{$max_imagesize}});
$('[id=comment-{{$id}}]').prop('click', null).off('click')
});
</script>