Respond to CR.

pull/2/head
Matthew Chen 6 years ago
parent d80f086f31
commit d824c49c07

@ -127,16 +127,13 @@ class AttachmentApprovalInputAccessoryView: UIView {
attachmentTextToolbar.textView.resignFirstResponder()
}
} else if (isEditingCaptions) {
// While editing captions, the keyboard should always remain visible.
if !attachmentCaptionToolbar.textView.isFirstResponder {
attachmentCaptionToolbar.textView.becomeFirstResponder()
}
} else {
if !attachmentTextToolbar.textView.isFirstResponder {
attachmentTextToolbar.textView.becomeFirstResponder()
}
}
invalidateIntrinsicContentSize()
// NOTE: We don't automatically make attachmentTextToolbar.textView
// first responder;
layoutSubviews()
}

@ -301,8 +301,8 @@ public class AttachmentApprovalViewController: UIPageViewController, UIPageViewC
}
private func updateControlVisibility() {
if !shouldHideControls {
self.becomeFirstResponder()
if !shouldHideControls, !isFirstResponder {
becomeFirstResponder()
}
bottomToolView.shouldHideControls = shouldHideControls
}

Loading…
Cancel
Save