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

moveTo() does not change the scroll position anymore #414

Closed
synth3 opened this issue Jan 9, 2017 · 2 comments
Closed

moveTo() does not change the scroll position anymore #414

synth3 opened this issue Jan 9, 2017 · 2 comments

Comments

@synth3
Copy link

synth3 commented Jan 9, 2017

Since version 0.7-M3 moveTo() does not scroll the text to the caret position anymore.

How to reproduce:

  • Create a CodeArea - for example
  • Set text that exceeds one page
  • scroll to the top of the area
  • call codeArea.moveTo(codeArea.getText().length() - 1)
    Result: the caret ist placed at the end of the text but the scroll position does not change / tha caret is outside of the text-viewport
    Expected Result: The text viewport changes so that the caret is visible (as in 0.7-M2)
@JordanMartinez
Copy link
Contributor

JordanMartinez commented Jan 9, 2017

Use requestFollowCaret() immediately after you call moveTo

area.moveTo(position);
area.requestFollowCaret();

@synth3
Copy link
Author

synth3 commented Jan 10, 2017

Thanks alot - that did the trick! :)

Before posting this issue I looked at the changes on the releases site. Maybe this major change in behavior should be there too.

@synth3 synth3 closed this as completed Jan 10, 2017
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

2 participants