Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caption not removed when close button is clicked #715

Closed
mxmauro opened this issue Jul 17, 2016 · 3 comments
Closed

Caption not removed when close button is clicked #715

mxmauro opened this issue Jul 17, 2016 · 3 comments

Comments

@mxmauro
Copy link

mxmauro commented Jul 17, 2016

Hi,

First, good job and very nice plugin.

I have an almost basic configuration using defaultPreviewContent to show a default image when none is selected. No initialPreview data.

I select a gif image, the preview appears correctly but when I press the close button, the image is removed BUT the caption at the left of the browse button remains.

Debugging the code I found _setCaption function exits because isError==false and if (isEmpty(content)) == true so the div is never cleared.

Regards.

@kartik-v
Copy link
Owner

kartik-v commented Aug 2, 2016

You need to set initialCaption property for your use case if you need to show a specific initial caption on clear. Remember to set it to a blank space (and not an empty string) if you do not want anything displayed.

@kartik-v kartik-v closed this as completed Aug 2, 2016
@kartik-v
Copy link
Owner

kartik-v commented Aug 2, 2016

Ok I will provide a fix for this.

@mxmauro
Copy link
Author

mxmauro commented Aug 2, 2016

Hi Kartik,

Thanks for the answer and fix.

Regards,
Mauro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants