diff --git a/CHANGELOG.md b/CHANGELOG.md index f62be3257..05944b5ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## next +- Remove useless `cropper-hide` class from cropper image. - Check whether the parent node exists or not before removing the cropper container. ## 1.5.12 (Jun 12, 2021) diff --git a/src/js/cropper.js b/src/js/cropper.js index 934351c65..20b445bf9 100644 --- a/src/js/cropper.js +++ b/src/js/cropper.js @@ -339,10 +339,8 @@ class Cropper { // Inserts the cropper after to the current image container.insertBefore(cropper, element.nextSibling); - // Show the image if is hidden - if (!this.isImg) { - removeClass(image, CLASS_HIDE); - } + // Show the hidden image + removeClass(image, CLASS_HIDE); this.initPreview(); this.bind();