fengyuanchen / cropper

⚠️ [Deprecated] No longer maintained, please use https://github.com/fengyuanchen/jquery-cropper
MIT License
7.75k stars 1.74k forks source link

Choose a file then close modal, then open the modal but can not choose the same file #907

Closed fattybamboo closed 7 years ago

fattybamboo commented 7 years ago

In the "crop-avatar" example, after opening an image file, click on dark area or just click "close" icon, the modal disappears. After re-open the modal, when re-opening an image file, if you choose the image which you chose just before the modal closed just now, it will not show.

fattybamboo commented 7 years ago

在"crop-avatar"示例中,在模态框中打开图片,点击背景或关闭按钮关闭模态框后,重新打开模态框,再试图打开刚才打开过的的图片,不能显示该图片,打开其他的图片则可以。

I test the "crop-avatar" example in Firefox, it works well, but in Chrome and IE 11 doesn't. I think that maybe the ''destroy" function doens't work well in Chrome and IE.

我在Firefox中测试不存在问题,但在Chrome和IE 11中有上述问题,是不是”destroy“函数在后两种浏览器中工作不正常所致?

fattybamboo commented 7 years ago

Actually, the problem mentioned above is the same as the one presented in #363 . In #363 the owner said it has been fixed, but I run the"crop-avatar" example of latest release in Chrome and IE 11, the problem still remains, although in Firefox everything works well. By saying "in Firefox everything works well", I mean that after opening an image file, then directly close the modal, then re-open the modal, no images show, but user can open the image file which is the same as the one opened before the modal closed. In Chrome and IE 11, user can not even open the same file.

fengyuanchen commented 7 years ago

If you choose the same file, the change event will not be triggered, just set input.value = '' after modal close.