From 64066349aa8da5e86223c6bd33af91a613f8b5b1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jakobus=20Sch=C3=BCrz?= Date: Tue, 14 Mar 2023 13:55:15 +0100 Subject: [PATCH] add timeout before remove images from dropzone --- view/templates/item/compose.tpl | 4 +++- view/theme/frio/templates/comment_item.tpl | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/view/templates/item/compose.tpl b/view/templates/item/compose.tpl index 689357ca12..581e8d29fd 100644 --- a/view/templates/item/compose.tpl +++ b/view/templates/item/compose.tpl @@ -123,7 +123,9 @@ // Image can be seen in posting-preview // We need preview to get optical feedback about upload-progress. // you see success, when the bb-code link for image is inserted - this.removeFile(file); + setTimeout(function(){ + dropzoneCompose.removeFile(file); + },5000); }); }, }); diff --git a/view/theme/frio/templates/comment_item.tpl b/view/theme/frio/templates/comment_item.tpl index d224db559b..127612b29c 100644 --- a/view/theme/frio/templates/comment_item.tpl +++ b/view/theme/frio/templates/comment_item.tpl @@ -93,7 +93,9 @@ // Image can be seen in posting-preview // We need preview to get optical feedback about upload-progress. // you see success, when the bb-code link for image is inserted - this.removeFile(file); + setTimeout(function(){ + dropzone{{$id}}.removeFile(file); + },5000); }); }, }); -- 2.39.5