sconsult / croppic

croppic
914 stars 228 forks source link

Stop modal window closing before onAfterImgCrop redirect #253

Open xxxmicrobexxx opened 7 years ago

xxxmicrobexxx commented 7 years ago

I have the following option

onAfterImgCrop:function(){ window.location='memberedit.php' }

to jump back to an edit page when the crop is complete.

What happens is that after cropping, the modal window closes leaving the original upload window visible for an instant before it does the redirect.

I would love it if it would redirect and leave the modal window intact to avoid the visual hiccup. I have looked through the croppic.js file and experimented with removing the destroyModal function, but that breaks to cropping altogether.

This is not a major drama, but would improve the user experience. Any suggestions?

And thanks for this cool plugin.