This is an automated email from the ASF dual-hosted git repository. michaelsmolina pushed a commit to branch 3.0 in repository https://gitbox.apache.org/repos/asf/superset.git
commit 8d3a919f5ef03e884a06a12b664bf7398b19430d Author: JUST.in DO IT <[email protected]> AuthorDate: Tue Aug 15 10:52:35 2023 -0700 fix(sqllab): scroll position after run current sql (#24965) (cherry picked from commit 155cf54c1522fa4963d00e85247b4d6ec1cbf767) --- superset-frontend/src/SqlLab/components/SqlEditor/index.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx b/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx index 69f9f36ee3..cda252f1e3 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx +++ b/superset-frontend/src/SqlLab/components/SqlEditor/index.jsx @@ -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, @@ -390,6 +391,7 @@ const SqlEditor = ({ startQuery(); editor.selection.clearSelection(); editor.moveCursorToPosition(cursorPosition); + editor.scrollToRow(currentRow); }, }, {
