     /**
      *  @private
      *  Check if a mouse click occured within the editor.
+     * 
+     *  @param event A MouseEvent or a SandboxMouseEvent
+     * 
+     *  @return true if the target is within the editor, false otherwise.
      */ 
     private function editorOwnsClick(event:Event):Boolean
     {
-        return (event is MouseEvent && 
-            event.target is IUIComponent &&
-            editorOwns(IUIComponent(event.target)));
-    }
-    
-    /**
-     *  @private
-     *  Check if a mouse click occured within the editor. The editor can be either
-     *  editedItemRenderer or itemEditorInstance.
-     * 
-     *  @param child - child to test.
+        if (event is MouseEvent)
+        {
+            var target:IUIComponent = getIUIComponent(DisplayObject(event.target));
+            if (target)
+                return editorOwns(target);
+        }
+
+        return false;
+    }
+    
+    /**
+     *  @private
+     *  Check if a child is contained within the editor using the owns() method.
+     *  The editor can be either editedItemRenderer or itemEditorInstance.
+     * 
+     *  @param child child to test.
      *  @return true if the child is owned by the editor.
      */ 
     private function editorOwns(child:IUIComponent):Boolean

 
    /**
     *  @private
     * 
     *  Restore the focusable children flags.
     */ 

        
        if (event.keyCode == dataGrid.editKey)
        {
            // ignore F2 if we are already editing a cell or the column is not
            // editable
            if (itemEditorInstance)
                return;
            
