Fixed floating of images
authorMarcel Werk <burntime@woltlab.com>
Sun, 14 Jun 2015 19:11:31 +0000 (21:11 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 14 Jun 2015 19:11:31 +0000 (21:11 +0200)
wcfsetup/install/files/js/WCF.ImageViewer.js

index 38e72bc292f581dd4123ae042d30413458d8bc7e..d251716aba31420173764a09d8691e13e15bd02d 100644 (file)
@@ -97,6 +97,15 @@ WCF.ImageViewer = Class.extend({
                        if (!$image.parents('a').length) {
                                $image.wrap('<a href="' + $image.attr('src') + '" class="jsImageViewerEnabled embeddedImageLink" />');
                                $image.parent().click($.proxy(this._click, this));
+                               
+                               if ($image.css('float') == 'right') {
+                                       $image.parent().addClass('messageFloatObjectRight');
+                               }
+                               else if ($image.css('float') == 'left') {
+                                       $image.parent().addClass('messageFloatObjectLeft');
+                               }
+                               $image[0].style.removeProperty('float');
+                               $image[0].style.removeProperty('margin');
                        }
                }
        }