         if (itemEditorInstance)
         {
             endEdit(AdvancedDataGridEventReason.OTHER);
-            losingFocus = true;
-            setFocus();
+			losingFocus = true;
+			setFocus();
         }
     }
 

	                if (_columns[_editedItemPosition.columnIndex].editable &&
	                    _columns[_editedItemPosition.columnIndex].visible)
	                {
                        foundOne = true;
                        break;
	                }
	            }


                if (itemEditorInstance && itemEditorInstance is UIComponent)
                    UIComponent(itemEditorInstance).drawFocus(false);

				// setfocus back to us so something on stage has focus
				deferFocus();
				
				// must call removeChild() so FocusManager.lastFocus becomes null
                itemEditorInstance.parent.removeChild(DisplayObject(itemEditorInstance));

                // we are not setting the item renderer's visibility to false while creating an editor,
