Work-around for Safari w/ disabled cache
authorAlexander Ebert <ebert@woltlab.com>
Mon, 24 Apr 2017 14:35:30 +0000 (16:35 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 24 Apr 2017 14:35:36 +0000 (16:35 +0200)
wcfsetup/install/files/js/WCF.ImageViewer.js

index 6aace2c5373f40f28c149eb59ff6bd29956d0fd6..165f6f656770b79dec20a9871702702e1be64602 100644 (file)
@@ -800,8 +800,8 @@ $.widget('ui.wcfImageViewer', {
                                var $img = new Image();
                                $img.src = imageData.image.url;
                                
-                               imageData.image.height = $img.height;
-                               imageData.image.width = $img.width;
+                               imageData.image.height = $img.height || $image[0].naturalHeight;
+                               imageData.image.width = $img.width || $image[0].naturalWidth;
                        }
                        else {
                                $image.css({