@@ -30,7 +30,6 @@ var Search = Control.extend({
3030 keyboardActiveClass : "keyboard-active" ,
3131
3232 //search options
33- minSearchLength : 3 ,
3433 searchTimeout : 400 ,
3534
3635 localStorageKeyPrefix : "bit-docs-search" ,
@@ -332,10 +331,10 @@ var Search = Control.extend({
332331 searchEngineSearch : function ( value ) {
333332 var self = this ;
334333 return this . searchEngine
335- //run the search
336- . search ( this . formatSearchTerm ( value ) )
337- //convert the results into a searchMap subset
338- . map ( function ( result ) { return self . searchMap [ result . ref ] } ) ;
334+ //run the search
335+ . search ( this . formatSearchTerm ( value ) )
336+ //convert the results into a searchMap subset
337+ . map ( function ( result ) { return self . searchMap [ result . ref ] } ) ;
339338 } ,
340339
341340 //function formatSearchTerm
@@ -381,7 +380,7 @@ var Search = Control.extend({
381380 var value = ev . target . value ;
382381
383382 //hide search if input is empty or less than min length
384- if ( ! value || ! value . length || value . length < this . options . minSearchLength ) {
383+ if ( ! value || ! value . length ) {
385384 this . unsetSearchState ( ) ;
386385 return ;
387386 }
@@ -396,6 +395,7 @@ var Search = Control.extend({
396395 this . selectActiveResult ( ) ;
397396 break ;
398397 default :
398+
399399 if ( value !== this . searchTerm ) {
400400 this . searchTerm = value ;
401401 this . search ( value ) ;
@@ -549,6 +549,7 @@ var Search = Control.extend({
549549 this . options . onResultsHide ( ) ;
550550 }
551551 this . deactivateResult ( ) ;
552+ $ ( '#left' ) . removeClass ( 'search-showing' ) ;
552553 this . $resultsContainer . stop ( ) . addClass ( "is-hiding" ) . fadeOut ( {
553554 duration : 400 ,
554555 complete : function ( ) {
@@ -580,7 +581,7 @@ var Search = Control.extend({
580581 duration : 400 ,
581582 complete : function ( ) {
582583 if ( ! self . $resultsContainer . is ( ".is-hiding" ) ) {
583- self . $resultsContainer . removeClass ( "is-showing" )
584+ self . $resultsContainer . removeClass ( "is-showing" ) ;
584585 if ( self . options . onResultsShown ) {
585586 self . options . onResultsShown ( ) ;
586587 }
@@ -589,6 +590,7 @@ var Search = Control.extend({
589590 } ) ;
590591
591592 this . $resultsContainer . scrollTop ( 0 ) ;
593+ $ ( '#left' ) . addClass ( 'search-showing' ) ;
592594 }
593595 } ,
594596
0 commit comments