Skip to content

Commit

Permalink
fix(sqllab): scroll position after run current sql (#24965)
Browse files Browse the repository at this point in the history
(cherry picked from commit 155cf54)
  • Loading branch information
justinpark authored and michael-s-molina committed Aug 16, 2023
1 parent 3ffc5b6 commit 8d3a919
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 8d3a919

Please sign in to comment.