diff --git a/view/theme/frio/templates/comment_item.tpl b/view/theme/frio/templates/comment_item.tpl index 5926e787ff..c0f78eda9d 100644 --- a/view/theme/frio/templates/comment_item.tpl +++ b/view/theme/frio/templates/comment_item.tpl @@ -67,8 +67,14 @@ <script> Dropzone.autoDiscover = false; + $('[id=comment-fake-text-{{$id}}]').on('focus', function() { + dzFactory.setupDropzone('#dropzone-{{$id}}', $('#comment-edit-text-{{$id}}'), {{$max_imagesize}}); + $('[id=comment-fake-text-{{$id}}]') .prop('focus', null).off('focus') + $('[id=comment-{{$id}}]') .prop('click', null).off('click') + }); $('[id=comment-{{$id}}]').on('click', function() { dzFactory.setupDropzone('#dropzone-{{$id}}', $('#comment-edit-text-{{$id}}'), {{$max_imagesize}}); - $('[id=comment-{{$id}}]').prop('click', null).off('click') + $('[id=comment-fake-text-{{$id}}]') .prop('focus', null).off('focus') + $('[id=comment-{{$id}}]') .prop('click', null).off('click') }); </script>