]> source.dussan.org Git - nextcloud-server.git/commitdiff
only show cropper dialog when the cropper is ready
authorRobin Appelman <robin@icewind.nl>
Thu, 20 Oct 2016 14:25:11 +0000 (16:25 +0200)
committerRobin Appelman <robin@icewind.nl>
Thu, 20 Oct 2016 14:25:11 +0000 (16:25 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
settings/js/personal.js

index 213af93a0fe240a0fb8f64c4dbdb3f7eff98939e..e75f6b9e0f333d09713c9fe718467e893fd31f65 100644 (file)
@@ -139,7 +139,6 @@ function showAvatarCropper () {
        // Looks weird, but on('load', ...) doesn't work in IE8
        $cropperImage.ready(function () {
                $('#displayavatar').hide();
-               $cropper.show();
 
                $cropperImage.Jcrop({
                        onChange: saveCoords,
@@ -148,6 +147,8 @@ function showAvatarCropper () {
                        boxHeight: 500,
                        boxWidth: 500,
                        setSelect: [0, 0, 300, 300]
+               }, function() {
+                       $cropper.show();
                });
        });
 }