         self.addSubview(self.placeholder)
 
         if !wasAttachedBeforeShowing {
+            self.updateBoundsToFitSize()
             self.placeholderDelegate?.expandableTextViewDidShowPlaceholder(self)
         }
     }

    // MARK: - Private methods

    private func updateBoundsToFitSize() {
        guard #available(iOS 13.0, *) else { return }

        /*
         Since iOS 13 Beta 4, changing a text doesn't cause a recalculation of the content size.
         Because of this, invalidateIntrinsicContentSize is not called, and layout is not updated.
         To fix it, updateBoundsToFitSize should be called on each text change.

         Analyzing a stack trace:
         -[_UITextContainerView setConstrainedFrameSize:] is still called.
         -[_UITextContainerView setFrame:] is NOT called since iOS 13 Beta 4.
         */

        self.bounds.size = self.sizeThatFits(self.bounds.size)
    }

    private func scrollToCaret() {


    @available(*, deprecated, message: "use placeholderText property instead")
    open func setTextPlaceholder(_ textPlaceholder: String) {
        self.placeholderText = textPlaceholder
    }

    open func setTextPlaceholderColor(_ color: UIColor) {
