From: Alexander Ebert Date: Sun, 11 Jan 2015 19:06:34 +0000 (+0100) Subject: Prevent images in signatures being recognized by the ImageViewer X-Git-Tag: 2.1.0_Beta_4~106^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=309c94cf2c95cdce5fda0c06baab249695b91f8f;p=GitHub%2FWoltLab%2FWCF.git Prevent images in signatures being recognized by the ImageViewer --- diff --git a/wcfsetup/install/files/js/WCF.ImageViewer.js b/wcfsetup/install/files/js/WCF.ImageViewer.js index d7fef73c7e..1277166334 100644 --- a/wcfsetup/install/files/js/WCF.ImageViewer.js +++ b/wcfsetup/install/files/js/WCF.ImageViewer.js @@ -83,6 +83,11 @@ WCF.ImageViewer = Class.extend({ $image.removeClass('jsResizeImage'); + // check if image falls within the signature, in that case ignore it + if ($image.closest('.messageSignature').length) { + return; + } + // setting img { max-width: 100% } causes the image to fit within boundaries, but does not reveal the original dimenions var $imageObject = new Image(); $imageObject.src = $image.attr('src');