Add workaround for safari imagesize calculation
authorFelix <F3l1ks@users.noreply.github.com>
Wed, 15 Apr 2015 19:42:38 +0000 (21:42 +0200)
committerFelix <F3l1ks@users.noreply.github.com>
Wed, 15 Apr 2015 19:42:38 +0000 (21:42 +0200)
wcfsetup/install/files/js/WCF.ImageViewer.js

index 38e72bc292f581dd4123ae042d30413458d8bc7e..b21d3cdc75dd44b1b5fddc038106b6cea7c66b4c 100644 (file)
@@ -738,8 +738,8 @@ $.widget('ui.wcfImageViewer', {
                }
                
                if (this.options.staticViewer && !imageData.image.height && $image[0].complete) {
-                       // Firefox returns bogus values if attempting to read the real dimensions
-                       if ($.browser.mozilla) {
+                       // Firefox and Safari returns bogus values if attempting to read the real dimensions
+                       if ($.browser.mozilla || $.browser.safari) {
                                var $img = new Image();
                                $img.src = imageData.image.url;