From b1cf180ab00b49aa43ae8b4354812e1751cc1bc4 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 8 Apr 2015 15:42:19 -0400 Subject: [PATCH] auto-select the first result in the search --- static/js/directives/ui/header-bar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/directives/ui/header-bar.js b/static/js/directives/ui/header-bar.js index 63dd9bfeb..b940c7233 100644 --- a/static/js/directives/ui/header-bar.js +++ b/static/js/directives/ui/header-bar.js @@ -79,7 +79,7 @@ angular.module('quay').directive('headerBar', function () { $scope.searchResultState = { 'state': resp.results.length ? 'results' : 'no-results', 'results': resp.results, - 'current': -1 + 'current': resp.results.length ? 0 : -1 }; }, function(resp) { $scope.searchResultState = null;