File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -297,9 +297,11 @@ class AutoComplete {
297297
298298 var params = this ;
299299 Array . prototype . forEach . call ( this . DOMResults . getElementsByTagName ( "li" ) , function ( li ) {
300- li . onclick = function ( event ) {
301- params . _Select ( li ) ;
302- } ;
300+ if ( li . getAttribute ( "class" ) != "locked" ) {
301+ li . onclick = function ( event ) {
302+ params . _Select ( li ) ;
303+ } ;
304+ }
303305 } ) ;
304306 } ,
305307
@@ -326,6 +328,7 @@ class AutoComplete {
326328 if ( response . length > 0 ) {
327329 this . DOMResults . innerHTML = response ;
328330 } else {
331+ li . innerHTML = this . EmptyMessage ;
329332 li . setAttribute ( "class" , "locked" ) ;
330333 ul . appendChild ( li ) ;
331334 }
@@ -481,7 +484,9 @@ class AutoComplete {
481484 }
482485
483486 params . Input = input ;
484- }
487+ } else {
488+ params . Input = element ;
489+ }
485490
486491 if ( params . Input . nodeName . match ( / ^ I N P U T $ / i) && params . Input . getAttribute ( "type" ) . match ( / ^ T E X T | S E A R C H $ / i) ) {
487492 params . Input . setAttribute ( "autocomplete" , "off" ) ;
You can’t perform that action at this time.
0 commit comments