Fixed imageviewer-links in popovers
authorMarcel Werk <burntime@woltlab.com>
Fri, 26 Aug 2016 14:47:49 +0000 (16:47 +0200)
committerMarcel Werk <burntime@woltlab.com>
Fri, 26 Aug 2016 14:47:49 +0000 (16:47 +0200)
wcfsetup/install/files/js/WCF.ImageViewer.js

index a1443db87d0a4f589e43097abea4281e54f7c32b..abb400f05ba589572f3b5f5024203b3779b49614 100644 (file)
@@ -55,6 +55,8 @@ WCF.ImageViewer = Class.extend({
        _click: function(event) {
                event.preventDefault();
                event.stopPropagation();
+               // skip if element is in a popover
+               if ($(event.currentTarget).closest('.popover').length) return;
                
                this._triggerElement.wcfImageViewer('open', null, $(event.currentTarget).wcfIdentify());
        },