Skip to content

Commit

Permalink
fix(sqllab): scroll position after run current sql (apache#24965)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpark authored Aug 15, 2023
1 parent 1904c7a commit ac2fb00
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions superset-frontend/src/SqlLab/components/SqlEditor/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ const SqlEditor = ({
const session = editor.getSession();
const cursorPosition = editor.getCursorPosition();
const totalLine = session.getLength();
const currentRow = editor.getFirstVisibleRow();
let end = editor.find(';', {
backwards: false,
skipCurrent: true,
Expand Down Expand Up @@ -390,6 +391,7 @@ const SqlEditor = ({
startQuery();
editor.selection.clearSelection();
editor.moveCursorToPosition(cursorPosition);
editor.scrollToRow(currentRow);
},
},
{
Expand Down

0 comments on commit ac2fb00

Please sign in to comment.