             textInputbar.insertSubview(textInputbarBackground, at: 0)
             textInputbarBackground.translatesAutoresizingMaskIntoConstraints = false
 
-            textInputbarHC = textInputbarBackground.heightAnchor.constraint(equalTo: textInputbar.heightAnchor, multiplier: 1, constant: view.safeAreaInsets.bottom)
-            textInputbarHC?.isActive = true
+            textInputbarBackgroundHeightConstraint = textInputbarBackground.heightAnchor.constraint(equalTo: textInputbar.heightAnchor, multiplier: 1, constant: view.safeAreaInsets.bottom)
+            textInputbarBackgroundHeightConstraint?.isActive = true
 
             textInputbarBackground.widthAnchor.constraint(equalTo: textInputbar.widthAnchor).isActive = true
             textInputbarBackground.topAnchor.constraint(equalTo: textInputbar.topAnchor).isActive = true

    // Enables for the interactive keyboard dismissal.
    // Gets called in scrollViewDidScroll and keyboardDidChangeFrame methods.
    private func updateKeyboardConstraints() {
        if keyboardHC == nil {
            keyboardHC = self.view.constraints.first {
                ($0.firstItem as? UIView) == self.view &&
                    ($0.secondItem as? SLKTextInputbar) == self.textInputbar
            }

        }

        // The conditional check should help prevent unnecessary re-draws.
        if let keyboardHC = keyboardHeightConstraint, keyboardHC.constant != keyboardHeight {
            keyboardHC.constant = keyboardHeight
        }
    }
