Keep top line in view when resizing Console to avoid losing user context#13695
Merged
nreese merged 3 commits intoelastic:masterfrom Aug 25, 2017
Merged
Keep top line in view when resizing Console to avoid losing user context#13695nreese merged 3 commits intoelastic:masterfrom
nreese merged 3 commits intoelastic:masterfrom
Conversation
Contributor
|
Functionally, this works well until I have results in my output, and then things start to behave weirdly. Regarding the technical implementation, I find it somewhat confusing that we're storing the |
Contributor
Author
|
@kobelb Thanks for the good idea of moving the state to |
nreese
added a commit
to nreese/kibana
that referenced
this pull request
Aug 25, 2017
…d losing user context (elastic#13695) * keep current cursor or top line in view when resizing to avoid losing user context * rename variable to more descriptive name * move state from editor to smart_resize
nreese
added a commit
to nreese/kibana
that referenced
this pull request
Aug 25, 2017
…d losing user context (elastic#13695) * keep current cursor or top line in view when resizing to avoid losing user context * rename variable to more descriptive name * move state from editor to smart_resize
nreese
added a commit
to nreese/kibana
that referenced
this pull request
Aug 25, 2017
…d losing user context (elastic#13695) * keep current cursor or top line in view when resizing to avoid losing user context * rename variable to more descriptive name * move state from editor to smart_resize
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

fixes #10677
When moving the divider pane in console, the editor will keep the cursor in the center. If no line is selected, then the editor will keep the top line at the start of the dragging as the top line.
There is nothing in ace.js that natively does this. There is an open issue, ajaxorg/ace#3339. This PR just keeps track of the cursor or top row when dragging starts and then scrolls to that row after calling resize.