File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -194,9 +194,10 @@ var AutoComplete = (function () {
194194 } ] ,
195195 Callback : function ( event ) {
196196 if ( this . DOMResults . getAttribute ( "class" ) . indexOf ( "open" ) != - 1 ) {
197- event . preventDefault ( ) ;
198197 var liActive = this . DOMResults . querySelector ( "li.active" ) ;
199198 if ( liActive !== null ) {
199+ event . preventDefault ( ) ;
200+
200201 this . _Select ( liActive ) ;
201202 this . DOMResults . setAttribute ( "class" , "autocomplete" ) ;
202203 }
Original file line number Diff line number Diff line change @@ -133,11 +133,10 @@ class AutoComplete {
133133 } ] ,
134134 Callback : function ( event ) {
135135 if ( this . DOMResults . getAttribute ( "class" ) . indexOf ( "open" ) != - 1 ) {
136- event . preventDefault ( ) ;
137-
138136 var liActive = this . DOMResults . querySelector ( "li.active" ) ;
139137
140138 if ( liActive !== null ) {
139+ event . preventDefault ( ) ;
141140 this . _Select ( liActive ) ;
142141 this . DOMResults . setAttribute ( "class" , "autocomplete" ) ;
143142 }
@@ -211,7 +210,7 @@ class AutoComplete {
211210 Callback : function ( ) {
212211 var oldValue = this . Input . getAttribute ( "data-autocomplete-old-value" ) ,
213212 currentValue = this . _Pre ( ) ;
214-
213+
215214 if ( currentValue !== "" && currentValue . length >= this . _MinChars ( ) ) {
216215 if ( ! oldValue || currentValue != oldValue ) {
217216 this . DOMResults . setAttribute ( "class" , "autocomplete open" ) ;
@@ -275,7 +274,7 @@ class AutoComplete {
275274 return this . MinChars ;
276275 }
277276
278- return parseInt ( minchars , 10 ) ;
277+ return parseInt ( minchars , 10 ) ;
279278 } ,
280279
281280 /**
You can’t perform that action at this time.
0 commit comments