Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow new password input keyboard to be dismissed #17938

Merged
merged 4 commits into from
Mar 16, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand Down
7 changes: 7 additions & 0 deletions WordPress/Classes/ViewRelated/NUX/SignupEpilogueCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -209,4 +210,10 @@ private extension SignupEpilogueCell {
}
}

func configureKeyboardReturnKey(for cellType: EpilogueCellType) {
if cellType == .displayName {
cellField.enablesReturnKeyAutomatically = true
}
}

}
15 changes: 10 additions & 5 deletions WordPress/Classes/ViewRelated/NUX/SignupEpilogueCell.xib
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand All @@ -17,19 +17,19 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IPK-b3-7Fi">
<rect key="frame" x="20" y="0.0" width="42" height="44"/>
<rect key="frame" x="20" y="0.0" width="35.5" height="44"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" semanticContentAttribute="forceLeftToRight" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="right" adjustsFontForContentSizeCategory="YES" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="BeK-ke-PFi" customClass="LoginTextField" customModule="WordPressAuthenticator">
<rect key="frame" x="62" y="0.0" width="293" height="44"/>
<rect key="frame" x="55.5" y="0.0" width="299.5" height="44"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" identifier="nuxEmailField"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" returnKeyType="done" enablesReturnKeyAutomatically="YES"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" returnKeyType="done"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="showTopLineSeparator" value="NO"/>
</userDefinedRuntimeAttributes>
Expand Down Expand Up @@ -63,4 +63,9 @@
<point key="canvasLocation" x="-298.5" y="-176"/>
</tableViewCell>
</objects>
<designables>
<designable name="BeK-ke-PFi">
<size key="intrinsicContentSize" width="4" height="18.5"/>
</designable>
</designables>
</document>