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

Text frame "jumps" on resignFirstResponder when not using UIReturnKeyDefault #297

Open
rholstad opened this issue Apr 14, 2021 · 0 comments

Comments

@rholstad
Copy link

This can be observed using the provided sample application and making the following changes to TPKAScrollViewController

  • Modify the returnKeyType and set the delegate for each UITextField
textField.returnKeyType = UIReturnKeyDone;
textField.delegate = self;
  • Implement -(BOOL)textFieldShouldReturn:(UITextField *)textField to dismiss keyboard
-(BOOL)textFieldShouldReturn:(UITextField *)textField {
    [textField resignFirstResponder];
    return true;
}

Type in any field and click the Done button. The _UITextContentView frame jumps to the left briefly before returning to its original position.
ezgif com-gif-maker

This was introduced in build 1.2.4 by adding [self layoutIfNeeded] to -TPKeyboardAvoiding_keyboardWillShow: in commit f533c6c. I see that the issue this was intended to address was "Scrollview stuttering problem on content inset/offset change fixed." Removing this code fixes the text jumping when resigning first responder status, but what are the ramifications?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant