From: Alexander Ebert Date: Mon, 15 Oct 2012 18:03:51 +0000 (+0200) Subject: Improved WCF.Popover X-Git-Tag: 2.0.0_Beta_1~861^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=57de5168002464da665cf8431d43546df2e95cc3;p=GitHub%2FWoltLab%2FWCF.git Improved WCF.Popover Popovers are hidden with display:none to disable any DOM interaction. Furthermore the popover is no longer triggered, if the link has no or empty 'href' attribute. Fixes #849 --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 71a4571ecf..9d81eca62f 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -5462,7 +5462,7 @@ WCF.Popover = Class.extend({ $element.hover($.proxy(this._overElement, this), $.proxy(this._out, this)); - if ($element.getTagName() === 'a') { + if ($element.getTagName() === 'a' && $element.attr('href')) { $element.click($.proxy(this._cancel, this)); } } @@ -5563,7 +5563,7 @@ WCF.Popover = Class.extend({ return; } - this._popover.stop().css({ opacity: 1 }).wcfFadeIn(); + this._popover.stop().show().css({ opacity: 1 }).wcfFadeIn(); if (this._data[this._activeElementID].loading) { this._loadContent(); @@ -5631,12 +5631,12 @@ WCF.Popover = Class.extend({ this._popover.stop(); if (disableAnimation) { - self._popover.css({ opacity: 0 }); + self._popover.css({ opacity: 0 }).hide(); self._popoverContent.empty().css({ height: 'auto', opacity: 0, width: 'auto' }); } else { this._popover.wcfFadeOut(function() { - self._popoverContent.empty().css({ height: 'auto', opacity: 0, width: 'auto' }); + self._popoverContent.empty().css({ height: 'auto', opacity: 0, width: 'auto' }).hide(); }); } },