     //        }
     //    }
     
+    
+    private func acceptClickEvent(_ event: NSEvent) -> Bool {
+        if let view = self.window?.contentView?.hitTest(event.locationInWindow) , view.isDescendant(of: self.contentDocumentView) == false {
+            if view == self.clipView || view.isDescendant(of: self) { self.window?.makeFirstResponder(self) }
+            return false
+        }
+        return true
+    }
+    
     var mouseDownIP: IndexPath?
     open override func mouseDown(with theEvent: NSEvent) {
         
         self.mouseDownIP = nil
-        if let view = self.window?.contentView?.hitTest(theEvent.locationInWindow) , view.isDescendant(of: self.contentDocumentView) == false {
-            if view == self.clipView || view.isDescendant(of: self) { self.window?.makeFirstResponder(self) }
+        guard acceptClickEvent(theEvent) else {
             return
         }
+        
+//        if let view = self.window?.contentView?.hitTest(theEvent.locationInWindow) , view.isDescendant(of: self.contentDocumentView) == false {
+//            if view == self.clipView || view.isDescendant(of: self) { self.window?.makeFirstResponder(self) }
+//            return
+//        }
         self.window?.makeFirstResponder(self)
         //        self.nextResponder?.mouseDown(theEvent)
         // super.mouseDown(theEvent) DONT DO THIS, it will consume the event and mouse up is not called

    
    open override func rightMouseDown(with theEvent: NSEvent) {
        super.rightMouseDown(with: theEvent)
        if let view = self.window?.contentView?.hitTest(theEvent.locationInWindow) , view.isDescendant(of: self.contentDocumentView) == false {
            return
        }
        
        let point = self.contentView.convert(theEvent.locationInWindow, from: nil)
        if let indexPath = self.indexPathForItemAtPoint(point) {

        var items : [NSDraggingItem] = []
        
        guard let mouseDown = mouseDownIP else { return }
        guard self.acceptClickEvent(theEvent) else { return }
        
        if self.interactionDelegate?.collectionView?(self, shouldBeginDraggingAtIndexPath: mouseDown, withEvent: theEvent) != true { return }
        
