                     break;
                 case Keyboard.TAB:
                 case Keyboard.ESCAPE:
-                    restoreEnteredTextAndHidePopUp(!_completionAccepted);
+                    showPreviousTextAndHidePopUp(!_completionAccepted);
                     break;
             }            
         }
         
-        private function onListItemClick(event : HighlightItemListEvent) : void {                        
-            acceptCompletion();            
+        private function onListItemClick(event : HighlightItemListEvent) : void {            
+            acceptCompletion();
             event.stopPropagation();
         }
         
         private function onMouseDownOutside(event:FlexMouseEvent) : void {            
             var mouseDownInsideComponent : Boolean = false;            
             var clickedObject : DisplayObjectContainer = event.relatedObject as DisplayObjectContainer;
-                        
+            
             while (!(clickedObject.parent is SystemManager)) {                
                 if (clickedObject == this) {
                     mouseDownInsideComponent = true;

        
        private var _promptChanged : Boolean;
        
        private var _enabledChanged : Boolean;
               
    }
		
}
                list.searchMode = searchMode;   
            } 
        }
        
        public function get searchMode() : String { 
            return _searchMode;
        };
        
        public function get labelField() : String { 
            return _labelField;
        };
        
        public function set labelField(field:String) : void {
            _labelField = field; 
            if (list) {
                list.labelField = field;   
            } 
        }
        
        public function get labelFunction() : Function	 { 
            return _labelFunction; 
        }
        
        public function set labelFunction(func:Function) : void {
            _labelFunction = func; 
            if (list) {
                list.labelFunction = func;   
            } 
        }
        
        [Bindable]
        public function get selectedItem() : Object { 
            return _selectedItem; 
        }
        
        public function set selectedItem(item : Object) : void {            
            _selectedItem = item;
            _selectedItemChanged = true;                                
            invalidateProperties();            
        }
        
        public function get prompt() : String {
            return _prompt;
        }
        
        public function set prompt(value : String) : void {
            _prompt = value;
            _promptChanged = true;
            invalidateProperties();            
        }
        
        public function get errorMessage() : String {
            return _errorMessage;
        }
        
        public function set errorMessage(value : String) : void {
            _errorMessage = value;
            _errorMessageChanged = true;
            invalidateProperties();
        }
        
        
        // default filter function         
        public function filterFunction(item : Object) : Boolean {
            var itemLabel : String = itemToLabel(item).toLowerCase();
