From cf420a89fec24124d3e6c9751425aeee6141c0be Mon Sep 17 00:00:00 2001 From: Paul Von Schrottky Date: Thu, 10 Feb 2022 17:22:00 -0300 Subject: [PATCH 1/3] Allow new password input keyboard to be dismissed --- .../ViewRelated/NUX/SignupEpilogueTableViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/WordPress/Classes/ViewRelated/NUX/SignupEpilogueTableViewController.swift b/WordPress/Classes/ViewRelated/NUX/SignupEpilogueTableViewController.swift index 3624471b79d4..43018f210589 100644 --- a/WordPress/Classes/ViewRelated/NUX/SignupEpilogueTableViewController.swift +++ b/WordPress/Classes/ViewRelated/NUX/SignupEpilogueTableViewController.swift @@ -36,6 +36,7 @@ class SignupEpilogueTableViewController: UITableViewController, EpilogueUserInfo override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .basicBackground + tableView.keyboardDismissMode = .interactive } override func viewWillAppear(_ animated: Bool) { From 8a90964e05061bc6cc7ca549201d2124fa341910 Mon Sep 17 00:00:00 2001 From: Paul Von Schrottky Date: Fri, 11 Mar 2022 14:50:33 -0300 Subject: [PATCH 2/3] New approach to dismissing password field keyboard This change sets enablesReturnKeyAutomatically to false on the password field to allow users to dismiss the keyboard while the field is focused, even if the field is empty. --- .../ViewRelated/NUX/SignupEpilogueCell.swift | 7 +++++++ .../ViewRelated/NUX/SignupEpilogueCell.xib | 15 ++++++++++----- .../NUX/SignupEpilogueTableViewController.swift | 1 - 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/WordPress/Classes/ViewRelated/NUX/SignupEpilogueCell.swift b/WordPress/Classes/ViewRelated/NUX/SignupEpilogueCell.swift index c893ef240331..0875b8d283b9 100644 --- a/WordPress/Classes/ViewRelated/NUX/SignupEpilogueCell.swift +++ b/WordPress/Classes/ViewRelated/NUX/SignupEpilogueCell.swift @@ -105,6 +105,7 @@ class SignupEpilogueCell: UITableViewCell { configureTextContentTypeIfNeeded(for: newCellType) configureAccessibility(for: newCellType) configureEditable(for: newCellType) + configureKeyboardReturnKey(for: newCellType) addBottomBorder(withColor: .divider, leadingMargin: cellLabelLeadingConstraint.constant) @@ -209,4 +210,10 @@ private extension SignupEpilogueCell { } } + func configureKeyboardReturnKey(for cellType: EpilogueCellType) { + if cellType == .displayName { + cellField.enablesReturnKeyAutomatically = true + } + } + } diff --git a/WordPress/Classes/ViewRelated/NUX/SignupEpilogueCell.xib b/WordPress/Classes/ViewRelated/NUX/SignupEpilogueCell.xib index 9bcd19aaf8b1..73e7ca33856d 100644 --- a/WordPress/Classes/ViewRelated/NUX/SignupEpilogueCell.xib +++ b/WordPress/Classes/ViewRelated/NUX/SignupEpilogueCell.xib @@ -1,9 +1,9 @@ - + - + @@ -17,19 +17,19 @@ - + - + @@ -63,4 +63,9 @@ + + + + + diff --git a/WordPress/Classes/ViewRelated/NUX/SignupEpilogueTableViewController.swift b/WordPress/Classes/ViewRelated/NUX/SignupEpilogueTableViewController.swift index 43018f210589..3624471b79d4 100644 --- a/WordPress/Classes/ViewRelated/NUX/SignupEpilogueTableViewController.swift +++ b/WordPress/Classes/ViewRelated/NUX/SignupEpilogueTableViewController.swift @@ -36,7 +36,6 @@ class SignupEpilogueTableViewController: UITableViewController, EpilogueUserInfo override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .basicBackground - tableView.keyboardDismissMode = .interactive } override func viewWillAppear(_ animated: Bool) { From 2bd71b37221a642487c0ce271812fcbdd65e085f Mon Sep 17 00:00:00 2001 From: Paul Von Schrottky Date: Mon, 14 Mar 2022 11:53:38 -0300 Subject: [PATCH 3/3] Update release notes for password keyboard fix --- RELEASE-NOTES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 97004ac745a7..41b4fab32ed8 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -3,6 +3,7 @@ * [*] Improves the error message shown when trying to create a new site with non-English characters in the domain name [https://github.com/wordpress-mobile/WordPress-iOS/pull/17985] * [*] Quick Start: updated the design for the Quick Start cell on My Site [#18095] * [*] Reader: Fixed a bug where comment replies are misplaced after its parent comment is moderated [#18094] +* [*] Bug fix: Allow keyboard to be dismissed when the password field is focused during WP.com account creation. 19.4 -----