         }
     }
     
-    
     fileprivate func makeAppropriateFieldFirstResponder() {
-        (useBackupOathToken ? backupOathTokenField : oathTokenFields.first)?.becomeFirstResponder()
+        switch displayMode {
+        case .longAlphaNumeric:
+            backupOathTokenField?.becomeFirstResponder()
+        case .shortNumeric:
+            oathTokenFields.first?.becomeFirstResponder()
+        }
     }
     
     @IBAction fileprivate func loginButtonTapped(withSender sender: UIButton) {

    }
    
    fileprivate func allowedCharacterSet() -> CharacterSet {
        return useBackupOathToken ? CharacterSet.init(charactersIn: " ").union(CharacterSet.alphanumerics) : CharacterSet.decimalDigits
    }

    fileprivate func maxTextFieldCharacterCount() -> Int {
        // Presently backup tokens are 16 digit, but may contain spaces and their length 
        // may change in future, so for now just set a sensible upper limit.
        return useBackupOathToken ? 24 : 1
    }
    
    func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {

        subTitleLabel.text = localizedStringForKeyFallingBackOnEnglish("two-factor-login-instructions")
        
        backupOathTokenField.wmf_addThinBottomBorder()
        displayMode = .shortNumeric
        backupOathTokenToggle.textColor = .wmf_blueTint()
        backupOathTokenToggle.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(backupOathTokenToggleTapped(_:))))

