Don't freak out when backspacing a value then deleting the whole tag
authorRichard Fairhurst <richard@systemeD.net>
Sat, 11 Jun 2011 10:26:59 +0000 (11:26 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Sat, 11 Jun 2011 10:26:59 +0000 (11:26 +0100)
net/systemeD/controls/AutoComplete.as

index 527b80490d790922535c97dbd4e9b8d2263d57cc..833e6274034898ce8772956998a1922b96d947dc 100644 (file)
@@ -355,6 +355,7 @@ package net.systemeD.controls {
                }
                                
                private function defaultFilterFunction(element:*, text:String):Boolean {
+                       if (!text || text=='') return false;
                        var label:String = itemToLabel(element);
                        return (label.toLowerCase().substring(0,text.length) == text.toLowerCase());
                }