attach dropzone only when opening comment

This commit is contained in:
Jakobus Schürz 2023-03-15 05:52:41 +01:00
parent 300af36d3d
commit 7604e21acc

View file

@ -67,5 +67,8 @@
<script> <script>
Dropzone.autoDiscover = false; 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> </script>