         {
             if (dataProvider)
                 _proposedSelectedIndex = dataProvider.getItemIndex(_pendingSelectedItem);
+            
+            if (allowCustomSelectedItem && _proposedSelectedIndex == -1)
+            {
+				_proposedSelectedIndex = CUSTOM_SELECTED_ITEM;
+                _selectedItem = _pendingSelectedItem;
+            }
+              
             _pendingSelectedItem = undefined;
         }
         

{
import flash.events.Event;

import spark.components.SkinnableDataContainer;
import spark.components.IItemRendererOwner; 
import spark.components.IItemRenderer; 
import spark.events.IndexChangeEvent;
import spark.events.RendererExistenceEvent;
import spark.layouts.supportClasses.LayoutBase;
import spark.utils.LabelUtil; 

import mx.collections.IList;
import mx.core.IVisualElement;
import mx.core.mx_internal;
import mx.core.UIComponent; 
import mx.events.FlexEvent; 
import mx.events.CollectionEvent;
import mx.events.CollectionEventKind;

use namespace mx_internal;  //ListBase and List share selection properties that are mx_internal


        var oldSelectedIndex:int = _selectedIndex;
        var oldCaretIndex:int = _caretIndex;
        
        if (_proposedSelectedIndex != CUSTOM_SELECTED_ITEM)
        {
            if (_proposedSelectedIndex < NO_SELECTION)
                _proposedSelectedIndex = NO_SELECTION;
            if (_proposedSelectedIndex > maxIndex)
                _proposedSelectedIndex = maxIndex;
            if (requireSelection && _proposedSelectedIndex == NO_SELECTION && 
                dataProvider && dataProvider.length > 0)
            {
                _proposedSelectedIndex = NO_PROPOSED_SELECTION;
                return false;
            }
        }
        
        // Step 2: dispatch the "changing" event. If preventDefault() is called
