From 1af138b01585e28bed4e836bdd6865298edf066f Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 14 Feb 2013 18:45:49 +0100 Subject: [PATCH] Improved behavior of suggestions --- wcfsetup/install/files/js/WCF.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; -- 2.20.1