From 9118a3b94411e54a91f1c7c786352f11bf99e874 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 16 Aug 2016 20:50:12 +0200 Subject: [PATCH] Restored original behavior --- wcfsetup/install/files/js/WCF.User.js | 40 ++------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.User.js b/wcfsetup/install/files/js/WCF.User.js index fe0c1bcaa8..aa8d0b9cfd 100644 --- a/wcfsetup/install/files/js/WCF.User.js +++ b/wcfsetup/install/files/js/WCF.User.js @@ -182,38 +182,7 @@ WCF.User.Panel.Abstract = Class.extend({ success: $.proxy(this._success, this) }); - var timerBlockClick = null; - this._triggerElement[0].addEventListener(WCF_CLICK_EVENT, (function(event) { - event.preventDefault(); - - if ($.browser.mobile) { - this.toggle(); - } - else if ((this._dropdown && this._dropdown.isOpen()) && timerBlockClick === null) { - this.toggle(); - } - }).bind(this)); - - //this._triggerElement.click($.proxy(this.toggle, this)); - - var timer = null; - this._triggerElement.hover( - (function() { - if (this._dropdown === null || !this._dropdown.isOpen()) { - timer = window.setTimeout((function() { - timerBlockClick = window.setTimeout(function() { - timerBlockClick = null; - }, 300); - - this.toggle(undefined, true); - }).bind(this), 300); - } - }).bind(this), - function() { - window.clearTimeout(timer); - timer = null; - } - ); + this._triggerElement.click($.proxy(this.toggle, this)); if (this._options.showAllLink) { this._triggerElement.dblclick($.proxy(this._dblClick, this)); @@ -234,10 +203,9 @@ WCF.User.Panel.Abstract = Class.extend({ * Toggles the interactive dropdown. * * @param {Event?} event - * @param {boolean?} openOnly * @return {boolean} */ - toggle: function(event, openOnly) { + toggle: function(event) { if (event instanceof Event) { event.preventDefault(); } @@ -246,10 +214,6 @@ WCF.User.Panel.Abstract = Class.extend({ this._dropdown = this._initDropdown(); } - if (openOnly === true && this._dropdown.isOpen()) { - return false; - } - if (this._dropdown.toggle()) { if (!this._loadData) { // check if there are outstanding items but there are no outstanding ones in the current list -- 2.20.1