             deleteBackgroundView()
             _ = dismissAction?() ?? dismiss()
         } else if originY != 0.0 {
-            if targetViewController?.view.frame.minY != 0.0 {
-                UIView.perform(.delete, on: [], options: [], animations: { [weak self] in
+                UIView.perform(.delete, on: [], options: [.allowUserInteraction], animations: { [weak self] in
                     self?.targetViewController?.view.frame.origin.y = 0.0
                     self?.resetBackgroundView()
-                }) { [weak self] _ in
-                    self?.deleteBackgroundView()
+                }) { [weak self] finished in
+                    if finished {
+                        self?.deleteBackgroundView()
+                    }
                 }
-            }
+        } else {
+            self.deleteBackgroundView()
         }
         viewPositionY = 0.0
     }

    
    fileprivate func startDragging() {
        viewPositionY = 0.0
        makeBackgroundView()
    }
    
    fileprivate func updateViewPosition(offset: CGFloat) {

    
    // MARK: - shadow view
    
    private func makeBackgroundViewIfNeeded() {
        deleteBackgroundView()
        switch background {
        case .shadow(let color, let alpha):
