This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,12 @@ angular.module('search', [])
6767 clearResults ( ) ;
6868 $scope . q = '' ;
6969 } ;
70+
71+ $scope . handleResultClicked = function ( $event ) {
72+ if ( $event . which === 1 && ! $event . ctrlKey && ! $event . metaKey ) {
73+ $scope . hideResults ( ) ;
74+ }
75+ } ;
7076} ] )
7177
7278
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ <h1 class="brand"><a href="http://angularjs.org"><img width="117" height="30" sr
132132 < div ng-repeat ="(key, value) in results track by key " class ="search-results-group " ng-class ="colClassName + ' col-group-' + key " ng-show ="value.length > 0 ">
133133 < h4 class ="search-results-group-heading "> {{ key }}</ h4 >
134134 < ul class ="search-results ">
135- < li ng-repeat ="item in value " class ="search-result "> < a ng-click ="hideResults( ) " ng-href ="{{ item.path }} "> {{ item.name }}</ a > </ li >
135+ < li ng-repeat ="item in value " class ="search-result "> < a ng-click ="handleResultClicked($event ) " ng-href ="{{ item.path }} "> {{ item.name }}</ a > </ li >
136136 </ ul >
137137 </ div >
138138 </ div >
You can’t perform that action at this time.
0 commit comments