         return true
     }
     
+    public func textFieldDidBeginEditing(_ textField: UITextField) {
+        // Set the focussed state
+        updateButtonStates()
+    }
 }
 
 // MARK - Internal

        let showsHint = state?.showsHint == true
        
        for (i, button) in buttons.enumerated() {
            if let newCharacter = textField.text?[i],
                newCharacter != "" {
                button.setTitle(newCharacter, for: .normal)

        button.backgroundColor = .white
        button.layer.cornerRadius = 2
        button.layer.borderWidth = 1
        return button
    }
    
