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() attachmentTextToolbar.textView.resignFirstResponder()
} }
} else if (isEditingCaptions) { } else if (isEditingCaptions) {
// While editing captions, the keyboard should always remain visible.
if !attachmentCaptionToolbar.textView.isFirstResponder { if !attachmentCaptionToolbar.textView.isFirstResponder {
attachmentCaptionToolbar.textView.becomeFirstResponder() attachmentCaptionToolbar.textView.becomeFirstResponder()
} }
} else {
if !attachmentTextToolbar.textView.isFirstResponder {
attachmentTextToolbar.textView.becomeFirstResponder()
}
} }
// NOTE: We don't automatically make attachmentTextToolbar.textView
invalidateIntrinsicContentSize() // first responder;
layoutSubviews() layoutSubviews()
} }

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

Loading…
Cancel
Save