   
   /// Checks if the rect with positioning `.none` is inside the container
   internal func rectContained(rect: CGRect) -> CGRect {
-    guard let containerView = containerView else { return .zero }
+    guard let containerView = containerView, constrainInContainerView else { return rect }
     
     var finalRect = rect
     

  @objc open dynamic var maskColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.6)
  /// Flag to enable or disable background mask
  @objc open dynamic var shouldShowMask = false
  /// Holds the CGrect with the rect the tip is pointing to
  open var from = CGRect.zero {
    didSet {

      bubbleOffset = -(arrowPosition.y - arrowSize.height)
    }
    
    if constrainInContainerView {
      let topSpace = frame.origin.y - containerView.frame.origin.y
      let bottomSpace = containerView.frame.height - topSpace - frame.height
      
      if bubbleOffset < 0 && topSpace < abs(bubbleOffset) {
        bubbleOffset = -topSpace + edgeMargin
      } else if bubbleOffset > 0 && bottomSpace < bubbleOffset {
        bubbleOffset = bottomSpace - edgeMargin
      }
    }
    
    frame.origin.y += bubbleOffset
