From 57de5168002464da665cf8431d43546df2e95cc3 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 15 Oct 2012 20:03:51 +0200 Subject: [PATCH] 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 --- wcfsetup/install/files/js/WCF.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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(); }); } }, -- 2.20.1