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

fixes "shake to undo" gesture bug. #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

esemusa
Copy link

@esemusa esemusa commented Jun 11, 2019

References Issue #55

The avoidingView was not moving back to the original position after "undo typing" click.

Basically, the problem is after the "undo typing" click the keyboardWillChangeFrameNotification observer will be called three times:
1 time: target to show the keyboard
2 time: target to hide the keyboard
3 time: target to show the keyboard

The third call will be executed bevor the "restore state" animation from the second call is finished. Therefore in the third call, all auto location are still saved in updatedConstraints & updatedConstraintConstants. So we need to wait for the animation to finish and then call didChange with the preserved notification object.

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

Successfully merging this pull request may close these issues.

1 participant