 
     override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
         super.viewWillTransition(to: size, with: coordinator)
-        // TODO: Update toolbars
-        //    [self.editorToolbar configureForHorizontalSizeClass:newCollection.horizontalSizeClass];
-        //    [self.titleToolbar configureForHorizontalSizeClass:newCollection.horizontalSizeClass];
-
     }
 
     // MARK: - Title and Title placeholder position methods
     func updateTitlePosition() {
         let referenceView: UIScrollView = editingMode == .richText ? richTextView : htmlTextView
-        titleTopConstraint.constant = -min(titleHeightConstraint.constant + separatorView.frame.height + (Constants.margin / 2), referenceView.contentOffset.y)
+        titleTopConstraint.constant = -(referenceView.contentOffset.y+referenceView.contentInset.top)
+
+        var contentInset = referenceView.contentInset
+        contentInset.top = (titleHeightConstraint.constant + separatorView.frame.height)
+        referenceView.contentInset = contentInset
     }
     
     func updateTitleHeight() {
+        let referenceView: UIScrollView = editingMode == .richText ? richTextView : htmlTextView
+
         let sizeThatShouldFitTheContent = titleTextField.sizeThatFits(CGSize(width:view.frame.width - ( 2 * Constants.margin), height: CGFloat.greatestFiniteMagnitude))
         let insets = titleTextField.textContainerInset
         titleHeightConstraint.constant = max(sizeThatShouldFitTheContent.height, titleTextField.font!.lineHeight + insets.top + insets.bottom)
+
+        var contentInset = referenceView.contentInset
+        contentInset.top = (titleHeightConstraint.constant + separatorView.frame.height)
+        referenceView.contentInset = contentInset
+        referenceView.setContentOffset(CGPoint(x:0, y: -contentInset.top), animated: false)
     }
 
     func updateTitlePlaceholderVisibility() {

        navigationController?.navigationBar.isTranslucent = false

        view.backgroundColor = UIColor.white
        view.addSubview(titleTextField)
        view.addSubview(titlePlaceholderLabel)
        view.addSubview(separatorView)
        view.addSubview(richTextView)
        view.addSubview(htmlTextView)

        configureConstraints()

        let html: String

        NSLayoutConstraint.activate([
            richTextView.leftAnchor.constraint(equalTo: view.leftAnchor, constant: Constants.margin),
            richTextView.rightAnchor.constraint(equalTo: view.rightAnchor, constant: -Constants.margin),
            richTextView.topAnchor.constraint(equalTo: view.topAnchor, constant: 0),
            richTextView.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -Constants.margin)
            ])

