     /// improves the performance
     public private(set) var isOverMaxTextViewHeight = false
     
+    private var isTraitCollectionDidChanged = false {
+        didSet {
+            defaultMaxTextViewHeight = (UIScreen.main.bounds.height / 5).rounded(.down)
+        }
+    }
+    
+    private var defaultMaxTextViewHeight = (UIScreen.main.bounds.height / 5).rounded(.down)
+    
     /// The maximum height that the InputTextView can reach
-    open var maxTextViewHeight: CGFloat = (UIScreen.main.bounds.height / 5).rounded(.down) {
-        didSet {
-            textViewHeightAnchor?.constant = maxTextViewHeight
+    open var maxTextViewHeight: CGFloat {
+        get {
+            if isSetMaxTextViewHeight {
+                return internalMaxTextViewHeight
+            }
+            return defaultMaxTextViewHeight
+        }
+        set {
+            isSetMaxTextViewHeight = true
+            internalMaxTextViewHeight = newValue
+            textViewHeightAnchor?.constant = newValue
             invalidateIntrinsicContentSize()
         }
     }
+    
+    private var internalMaxTextViewHeight: CGFloat = 0
+    
+    private var isSetMaxTextViewHeight: Bool = false
     
     /// The height that will fit the current text in the InputTextView based on its current bounds
     public var requiredInputTextViewHeight: CGFloat {
         let maxTextViewSize = CGSize(width: inputTextView.bounds.width, height: .greatestFiniteMagnitude)
-        return inputTextView.sizeThatFits(maxTextViewSize).height.rounded(.down)
+        return inputTextView.sizeThatFits(maxTextViewSize).height.rounded(.up)
     }
     
     /// The fixed widthAnchor constant of the leftStackView

    // MARK: - Notifications/Hooks
    
    /// Invalidates the intrinsicContentSize
    @objc
    open func orientationDidChange() {
        invalidateIntrinsicContentSize()
    }
    
    /// Enables/Disables the sendButton based on the InputTextView's text being empty

        
        var inputTextViewHeight = requiredInputTextViewHeight
        if inputTextViewHeight >= maxTextViewHeight {
            if !isOverMaxTextViewHeight || isTraitCollectionDidChanged {
                textViewHeightAnchor?.constant = maxTextViewHeight
                textViewHeightAnchor?.isActive = true
                inputTextView.isScrollEnabled = true
                isOverMaxTextViewHeight = true
            }
            inputTextViewHeight = maxTextViewHeight
        } else {
            if isOverMaxTextViewHeight || isTraitCollectionDidChanged {
                textViewHeightAnchor?.isActive = false
                inputTextView.isScrollEnabled = false
                isOverMaxTextViewHeight = false
                inputTextView.invalidateIntrinsicContentSize()
            }
        }
        
        isTraitCollectionDidChanged = false
        
        // Calculate the required height
        let totalPadding = padding.top + padding.bottom + topStackViewPadding.top + textViewPadding.top + textViewPadding.bottom
