From: Alexander Ebert Date: Thu, 14 Feb 2013 17:45:49 +0000 (+0100) Subject: Improved behavior of suggestions X-Git-Tag: 2.0.0_Beta_1~484 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1af138b01585e28bed4e836bdd6865298edf066f;p=GitHub%2FWoltLab%2FWCF.git Improved behavior of suggestions --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 015489fae2..4eceda2650 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -4897,7 +4897,10 @@ WCF.Search.Base = Class.extend({ this._list.parent().addClass('dropdownOpen'); WCF.Dropdown.setAlignment(undefined, this._list); - WCF.CloseOverlayHandler.addCallback('WCF.Search.Base', $.proxy(function() { this._clearList(true); }, this)); + WCF.CloseOverlayHandler.addCallback('WCF.Search.Base', $.proxy(function() { this._clearList(); }, this)); + + // pre-select first item + this._selectNextItem(); }, /** @@ -6872,7 +6875,7 @@ WCF.EditableItemList = Class.extend({ * @param object event */ _keyDown: function(event) { - if (event === null || (event.which === 13 || event.which === 188)) { + if (event === null || event.which === 188) { var $value = $.trim(this._searchInput.val()); if ($value === '') { return true;