From: Marcel Werk Date: Sun, 14 Jun 2015 19:11:31 +0000 (+0200) Subject: Fixed floating of images X-Git-Tag: 2.1.5~24 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=76b7aa0228a654dea1ecf61eb9b190db53f6679d;p=GitHub%2FWoltLab%2FWCF.git Fixed floating of images --- diff --git a/wcfsetup/install/files/js/WCF.ImageViewer.js b/wcfsetup/install/files/js/WCF.ImageViewer.js index 38e72bc292..d251716aba 100644 --- a/wcfsetup/install/files/js/WCF.ImageViewer.js +++ b/wcfsetup/install/files/js/WCF.ImageViewer.js @@ -97,6 +97,15 @@ WCF.ImageViewer = Class.extend({ if (!$image.parents('a').length) { $image.wrap(''); $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'); } } }