From 5f97a219656c9109efa2f7aad81974c3cd5bc537 Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 29 Jul 2020 14:15:20 +0200 Subject: [PATCH] Added default behaviour for return key --- ui/BankingiOSApp/BankingiOSApp/ui/UIKitTextField.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/UIKitTextField.swift b/ui/BankingiOSApp/BankingiOSApp/ui/UIKitTextField.swift index 57092c3c..0a07a39c 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/UIKitTextField.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/UIKitTextField.swift @@ -114,6 +114,10 @@ struct UIKitTextField: UIViewRepresentable { didHandleReturnKey = nextView?.becomeFirstResponder() ?? false } + + if didHandleReturnKey == false { + textField.resignFirstResponder() // default behaviour + } return didHandleReturnKey }