         if coverViewWindowCoordinates.y <= (keyboardSize.minY - keyboardSize.height) {
             return
         }
+
         popupCenterYPositionBeforeKeyboard = popupView.center.y
         let difference = coverViewWindowCoordinates.y - (keyboardSize.minY - keyboardSize.height)
         popupView.center.y -= difference
     }
 
     @objc func keyboardWillHide(_ notification: Notification) {
+        self.isKeyboardVisible = false
         guard let initialY = self.popupCenterYPositionBeforeKeyboard else {
             return
         }

    }

    @objc func keyboardWillShow(_ notification: Notification) {
        guard let userInfo = notification.userInfo else {
            return
        }

    private var messageLabel: UILabel = UILabel(frame: .zero)
    private var textField: UITextField = UITextField(frame: .zero)
    private var type: CDAlertViewType!
    private var isKeyboardVisible: Bool = false
    weak private var hideTimer: Timer!
    public var headerHeight: CGFloat = CDAlertViewConstants().headerHeight
    
