[ticket/12539] Reposition ESC to be on top

PHPBB3-12539
This commit is contained in:
mrgoldy 2019-10-22 22:20:27 +02:00
parent fe7118aea0
commit ade88f020e

View file

@ -745,6 +745,11 @@ phpbb.search.navigateResults = function($input, $container, $resultContainer) {
$active = $resultContainer.children('.active');
switch (key) {
// Close the results
case keymap.ESC:
phpbb.search.closeResults($input, $container);
break;
// Set the value for the selected result
case keymap.ENTER:
if ($active.length) {
@ -759,11 +764,6 @@ phpbb.search.navigateResults = function($input, $container, $resultContainer) {
event.preventDefault();
break;
// Close the results
case keymap.ESC:
phpbb.search.closeResults($input, $container);
break;
// Navigate the results
case keymap.ARROW_DOWN:
case keymap.ARROW_UP: