-
Notifications
You must be signed in to change notification settings - Fork 73
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
Wrong offset with newlines #12
Comments
I have no idea why the above happens but this could be a possible workaround:
|
👍 that solved my issue as well |
I am seeing this issue as well. When a newline is added (with a character or a line break character) the caret is not always properly scrolled into view. A lot of the time the last line is cut off. The above does fix the issue but now the text jumps around when the frame is equal to the height of the text. |
I can fix the text jumping by changing
to
in |
@joshuafeldman thanks for sharing 👍 |
…e content offset doesn't intentionally get set to a negative value which is causing the text to jump in a perfectly sized text view with a single line.
The textView scrolls to the wrong offset when reaching the end of texts with newlines. The problem appears to be
carectRectForPosition:
, which reports the wrong rect for the end of document. See log and animated gif below.Steps to reproduce:
Log:
The text was updated successfully, but these errors were encountered: