From 309c94cf2c95cdce5fda0c06baab249695b91f8f Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 11 Jan 2015 20:06:34 +0100 Subject: [PATCH] Prevent images in signatures being recognized by the ImageViewer --- wcfsetup/install/files/js/WCF.ImageViewer.js | 5 +++++ 1 file changed, 5 insertions(+) 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'); -- 2.20.1