From 0c6bc57ff4b93d1fd715547c519bb9967f10b746 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Fri, 29 Aug 2025 23:51:47 +0900 Subject: [PATCH 01/10] [ZEPPELIN-6298] fix: cursor focus when a paragraph is deleted --- .../pages/workspace/notebook/notebook.component.ts | 11 +++++++++-- .../notebook/paragraph/paragraph.component.ts | 1 - 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts index f7511cd75ca..da17062e392 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts @@ -128,8 +128,15 @@ export class NotebookComponent extends MessageListenersManager implements OnInit return; } const definedNote = this.note; - definedNote.paragraphs = definedNote.paragraphs.filter(p => p.id !== data.id); - this.cdr.markForCheck(); + const paragraphIndex = definedNote.paragraphs.findIndex(p => p.id === data.id); + definedNote.paragraphs.splice(paragraphIndex, 1); + + setTimeout(() => { + const adjustedCursorIndex = + paragraphIndex === definedNote.paragraphs.length ? paragraphIndex - 1 : paragraphIndex + 1; + this.listOfNotebookParagraphComponent.find((_, index) => index === adjustedCursorIndex)?.focusEditor(); + this.cdr.markForCheck(); + }, 250); } @MessageListener(OP.PARAGRAPH_ADDED) diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts index d740b9317f8..38c9ed6f72c 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts @@ -186,7 +186,6 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, nzOnOk: () => { this.messageService.paragraphRemove(this.paragraph.id); this.cdr.markForCheck(); - // TODO(hsuanxyz) moveFocusToNextParagraph } }); } From 321fb8b575c4c6d0f45825f00252257807141ba5 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Fri, 29 Aug 2025 23:53:14 +0900 Subject: [PATCH 02/10] [ZEPPELIN-6298] fix: focus cursor after runAllAbove, runAllBelow --- .../code-editor/code-editor.component.ts | 38 +++++++++++++++++-- .../notebook/paragraph/paragraph.component.ts | 28 ++++++++------ 2 files changed, 52 insertions(+), 14 deletions(-) diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts index 5cf9d2623f0..e4e0c0aba46 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts @@ -23,7 +23,7 @@ import { Output, SimpleChanges } from '@angular/core'; -import { editor as MonacoEditor, IDisposable, KeyCode } from 'monaco-editor'; +import { editor as MonacoEditor, IDisposable, IPosition, KeyCode, Position } from 'monaco-editor'; import { InterpreterBindingItem } from '@zeppelin/sdk'; import { CompletionService, MessageService } from '@zeppelin/services'; @@ -41,8 +41,7 @@ type IEditor = MonacoEditor.IEditor; changeDetection: ChangeDetectionStrategy.OnPush }) export class NotebookParagraphCodeEditorComponent implements OnChanges, OnDestroy, AfterViewInit { - // TODO(hsuanxyz): - // 1. cursor position + @Input() position: IPosition | null = null; @Input() readOnly = false; @Input() language = 'text'; @Input() paragraphControl!: NotebookParagraphControlComponent; @@ -174,6 +173,35 @@ export class NotebookParagraphCodeEditorComponent implements OnChanges, OnDestro findInput.select(); } } + + setCursorPosition({ lineNumber, column }: IPosition) { + if (this.editor) { + this.editor.setPosition({ lineNumber, column }); + } + } + + setRestorePosition() { + if (this.editor) { + const previousPosition = this.position ?? { lineNumber: 0, column: 0 }; + this.setCursorPosition(previousPosition); + this.editor.focus(); + } + } + + setCursorPositionToBeginning() { + if (this.editor) { + this.setCursorPosition({ lineNumber: 0, column: 0 }); + this.editor.focus(); + } + } + + setCursorPositionToEnd() { + if (this.editor) { + const lineNumber = this.editor.getModel()?.getLineCount() ?? 0; + const column = this.editor.getModel()?.getLineMaxColumn(lineNumber) ?? 0; + this.setCursorPosition({ lineNumber, column }); + } + } initializedEditor(editor: IEditor) { this.editor = editor as IStandaloneCodeEditor; @@ -308,6 +336,10 @@ export class NotebookParagraphCodeEditorComponent implements OnChanges, OnDestro } } if (focus) { + if (!focus.currentValue && this.editor) { + this.position = this.editor.getPosition(); + return; + } this.initEditorFocus(); } if (text) { diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts index 38c9ed6f72c..79923c974ad 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts @@ -64,7 +64,7 @@ type Mode = 'edit' | 'command'; }) export class NotebookParagraphComponent extends ParagraphBase implements OnInit, OnChanges, OnDestroy, AfterViewInit { @ViewChild(NotebookParagraphCodeEditorComponent, { static: false }) - notebookParagraphCodeEditorComponent!: NotebookParagraphCodeEditorComponent; + notebookParagraphCodeEditorComponent?: NotebookParagraphCodeEditorComponent; @ViewChildren(NotebookParagraphResultComponent) notebookParagraphResultComponents!: QueryList< NotebookParagraphResultComponent >; @@ -205,14 +205,19 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, params: p.settings.params }; }); - this.nzModalService.confirm({ - nzTitle: 'Run all above?', - nzContent: 'Are you sure to run all above paragraphs?', - nzOnOk: () => { - this.messageService.runAllParagraphs(this.note.id, paragraphs); - } - }); - // TODO(hsuanxyz): save cursor + this.nzModalService + .confirm({ + nzTitle: 'Run all above?', + nzContent: 'Are you sure to run all above paragraphs?', + nzOnOk: () => { + this.messageService.runAllParagraphs(this.note.id, paragraphs); + } + }) + .afterClose.pipe(takeUntil(this.destroy$)) + .subscribe(() => { + this.waitConfirmFromEdit = false; + this.notebookParagraphCodeEditorComponent?.setRestorePosition(); + }); } doubleClickParagraph() { @@ -222,7 +227,8 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, if (this.paragraph.config.editorSetting.editOnDblClick && this.revisionView !== true) { this.paragraph.config.editorHide = false; this.paragraph.config.tableHide = true; - // TODO(hsuanxyz): focus editor + this.focusEditor(); + setTimeout(() => this.notebookParagraphCodeEditorComponent?.setCursorPositionToEnd()); } } @@ -250,8 +256,8 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, .afterClose.pipe(takeUntil(this.destroy$)) .subscribe(() => { this.waitConfirmFromEdit = false; + this.notebookParagraphCodeEditorComponent?.setRestorePosition(); }); - // TODO(hsuanxyz): save cursor } cloneParagraph(position: string = 'below', newText?: string) { From 97c13b5c6a36f2f66096e1a159db621a6a69743d Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Sat, 30 Aug 2025 12:20:11 +0900 Subject: [PATCH 03/10] [ZEPPELIN-6298] fix: focus cursor on the newly inserted paragraph --- .../pages/workspace/notebook/notebook.component.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts index da17062e392..7a502c14476 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts @@ -149,15 +149,11 @@ export class NotebookComponent extends MessageListenersManager implements OnInit return; } const definedNote = this.note; - definedNote.paragraphs.splice(data.index, 0, data.paragraph).map(p => { - return { - ...p, - focus: p.id === data.paragraph.id - }; - }); - definedNote.paragraphs = [...definedNote.paragraphs]; + definedNote.paragraphs.splice(data.index, 0, data.paragraph); + const paragraphIndex = definedNote.paragraphs.findIndex(p => p.id === data.paragraph.id); + this.cdr.markForCheck(); - // TODO(hsuanxyz) focus on paragraph + definedNote.paragraphs[paragraphIndex].focus = true; } @MessageListener(OP.SAVE_NOTE_FORMS) From a0ef5665f22cd29693f76d42d88d46ec2ea4e4f6 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Wed, 3 Sep 2025 22:41:57 +0900 Subject: [PATCH 04/10] [ZEPPELIN-6298] chore: reorder addParagraph's markForCheck() --- .../src/app/pages/workspace/notebook/notebook.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts index 7a502c14476..60ce42c2406 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts @@ -152,8 +152,8 @@ export class NotebookComponent extends MessageListenersManager implements OnInit definedNote.paragraphs.splice(data.index, 0, data.paragraph); const paragraphIndex = definedNote.paragraphs.findIndex(p => p.id === data.paragraph.id); - this.cdr.markForCheck(); definedNote.paragraphs[paragraphIndex].focus = true; + this.cdr.markForCheck(); } @MessageListener(OP.SAVE_NOTE_FORMS) From 9e3d86529a0b80d75c81d82a918cc35e595f4c7f Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Wed, 3 Sep 2025 22:42:45 +0900 Subject: [PATCH 05/10] [ZEPPELIN-6298] fix: changed the logic for saving the cursor position --- .../paragraph/code-editor/code-editor.component.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts index e4e0c0aba46..2fe88d10d2a 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts @@ -82,7 +82,11 @@ export class NotebookParagraphCodeEditorComponent implements OnChanges, OnDestro editor.onDidBlurEditorText(() => { this.editorBlur.emit(); }), - + editor.onDidChangeCursorPosition(e => { + this.ngZone.run(() => { + this.position = e.position; + }); + }), editor.onDidChangeModelContent(() => { this.ngZone.run(() => { const model = editor.getModel(); @@ -336,10 +340,6 @@ export class NotebookParagraphCodeEditorComponent implements OnChanges, OnDestro } } if (focus) { - if (!focus.currentValue && this.editor) { - this.position = this.editor.getPosition(); - return; - } this.initEditorFocus(); } if (text) { From f4199ed0d8b8d68ea6eef70d30a1ef29eb05e9c1 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Thu, 4 Sep 2025 00:19:19 +0900 Subject: [PATCH 06/10] [ZEPPELIN-6298] fix: remove setTimout in doubleClickParagraph() --- .../pages/workspace/notebook/paragraph/paragraph.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts index 79923c974ad..31f18143e1b 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts @@ -228,7 +228,8 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, this.paragraph.config.editorHide = false; this.paragraph.config.tableHide = true; this.focusEditor(); - setTimeout(() => this.notebookParagraphCodeEditorComponent?.setCursorPositionToEnd()); + this.cdr.detectChanges(); + this.notebookParagraphCodeEditorComponent?.setCursorPositionToEnd(); } } From 603b9b126c16cec1435f697f971a50526f93b52d Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Thu, 4 Sep 2025 22:08:18 +0900 Subject: [PATCH 07/10] [ZEPPELIN-6298] fix: prevented blur when executing focusEditor in REMOVE_PARAGRAPH --- .../workspace/notebook/notebook.component.ts | 17 +++++++++-------- .../notebook/paragraph/paragraph.component.ts | 10 ++++++++++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts index 60ce42c2406..d36152bd0d5 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts @@ -129,14 +129,15 @@ export class NotebookComponent extends MessageListenersManager implements OnInit } const definedNote = this.note; const paragraphIndex = definedNote.paragraphs.findIndex(p => p.id === data.id); - definedNote.paragraphs.splice(paragraphIndex, 1); - - setTimeout(() => { - const adjustedCursorIndex = - paragraphIndex === definedNote.paragraphs.length ? paragraphIndex - 1 : paragraphIndex + 1; - this.listOfNotebookParagraphComponent.find((_, index) => index === adjustedCursorIndex)?.focusEditor(); - this.cdr.markForCheck(); - }, 250); + definedNote.paragraphs = definedNote.paragraphs.filter((p, index) => index !== paragraphIndex); + const adjustedCursorIndex = + paragraphIndex === definedNote.paragraphs.length ? paragraphIndex - 1 : paragraphIndex + 1; + const targetParagraph = this.listOfNotebookParagraphComponent.find((_, index) => index === adjustedCursorIndex); + if (targetParagraph) { + targetParagraph.ignoreBlur = true; + targetParagraph.focusEditor(); + } + this.cdr.markForCheck(); } @MessageListener(OP.PARAGRAPH_ADDED) diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts index 31f18143e1b..5f82b5766e6 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts @@ -89,6 +89,8 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, private destroy$ = new Subject(); private mode: Mode = 'command'; waitConfirmFromEdit = false; + // Added a variable to prevent the automatically triggered blur action after executing focusEditor when receiving PARAGRAPH_REMOVED + ignoreBlur = false; switchMode(mode: Mode): void { if (mode === this.mode) { @@ -139,6 +141,10 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, } blurEditor() { + if (this.ignoreBlur) { + this.ignoreBlur = false; + return; + } this.paragraph.focus = false; (this.host.nativeElement as HTMLElement).focus(); this.saveParagraph(); @@ -150,6 +156,10 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, } onEditorBlur() { + if (this.ignoreBlur) { + this.notebookParagraphCodeEditorComponent?.setRestorePosition(); + return; + } // Ignore events triggered by open the confirm box in edit mode if (!this.waitConfirmFromEdit) { this.switchMode('command'); From 3ec2ae6e7a65785424cdb87720290093135c635a Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Sat, 6 Sep 2025 23:39:19 +0900 Subject: [PATCH 08/10] [ZEPPELIN-6298] fix: remove ignoreBlur variable then use nzModalService --- .../app/pages/workspace/notebook/notebook.component.ts | 1 - .../workspace/notebook/paragraph/paragraph.component.ts | 9 ++++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts index d36152bd0d5..57e5b207495 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts @@ -134,7 +134,6 @@ export class NotebookComponent extends MessageListenersManager implements OnInit paragraphIndex === definedNote.paragraphs.length ? paragraphIndex - 1 : paragraphIndex + 1; const targetParagraph = this.listOfNotebookParagraphComponent.find((_, index) => index === adjustedCursorIndex); if (targetParagraph) { - targetParagraph.ignoreBlur = true; targetParagraph.focusEditor(); } this.cdr.markForCheck(); diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts index 5f82b5766e6..d32f5165fe7 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts @@ -89,8 +89,6 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, private destroy$ = new Subject(); private mode: Mode = 'command'; waitConfirmFromEdit = false; - // Added a variable to prevent the automatically triggered blur action after executing focusEditor when receiving PARAGRAPH_REMOVED - ignoreBlur = false; switchMode(mode: Mode): void { if (mode === this.mode) { @@ -141,8 +139,7 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, } blurEditor() { - if (this.ignoreBlur) { - this.ignoreBlur = false; + if (this.nzModalService.openModals.length > 0) { return; } this.paragraph.focus = false; @@ -156,7 +153,8 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, } onEditorBlur() { - if (this.ignoreBlur) { + if (this.nzModalService.openModals.length > 0) { + // When removing a paragraph, detect when the modal is closed and restore focus this.notebookParagraphCodeEditorComponent?.setRestorePosition(); return; } @@ -193,6 +191,7 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, this.nzModalService.confirm({ nzTitle: 'Delete Paragraph', nzContent: 'Do you want to delete this paragraph?', + nzAutofocus: null, nzOnOk: () => { this.messageService.paragraphRemove(this.paragraph.id); this.cdr.markForCheck(); From 5e3171385567fb50dbaae65a62c6d9e83cc062f1 Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Sun, 7 Sep 2025 09:06:28 +0900 Subject: [PATCH 09/10] [ZEPPELIN-6298] fix: change removePragraph timing when modal totally closed --- .../notebook/paragraph/paragraph.component.ts | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts index d32f5165fe7..bdd6adfb059 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.ts @@ -139,9 +139,6 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, } blurEditor() { - if (this.nzModalService.openModals.length > 0) { - return; - } this.paragraph.focus = false; (this.host.nativeElement as HTMLElement).focus(); this.saveParagraph(); @@ -153,11 +150,6 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, } onEditorBlur() { - if (this.nzModalService.openModals.length > 0) { - // When removing a paragraph, detect when the modal is closed and restore focus - this.notebookParagraphCodeEditorComponent?.setRestorePosition(); - return; - } // Ignore events triggered by open the confirm box in edit mode if (!this.waitConfirmFromEdit) { this.switchMode('command'); @@ -188,15 +180,22 @@ export class NotebookParagraphComponent extends ParagraphBase implements OnInit, nzContent: `All the paragraphs can't be deleted` }); } else { - this.nzModalService.confirm({ - nzTitle: 'Delete Paragraph', - nzContent: 'Do you want to delete this paragraph?', - nzAutofocus: null, - nzOnOk: () => { - this.messageService.paragraphRemove(this.paragraph.id); - this.cdr.markForCheck(); - } - }); + this.nzModalService + .confirm({ + nzTitle: 'Delete Paragraph', + nzContent: 'Do you want to delete this paragraph?', + nzAutofocus: null, + nzOnOk: () => true + }) + .afterClose.pipe(takeUntil(this.destroy$)) + .subscribe(result => { + // In the modal, clicking "Cancel" makes result undefined. + // Clicking "OK" makes result defined and passes the condition below. + if (result) { + this.messageService.paragraphRemove(this.paragraph.id); + this.cdr.markForCheck(); + } + }); } } } From 3731ca2a849d7b3aebecfb4628123fbed2a2214a Mon Sep 17 00:00:00 2001 From: YONGJAE LEE Date: Sun, 7 Sep 2025 21:35:19 +0900 Subject: [PATCH 10/10] [ZEPPELIN-6298] chore: fix lint error caused by rebase --- .../notebook/paragraph/code-editor/code-editor.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts index 2fe88d10d2a..fdbc3f37d02 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts @@ -177,7 +177,7 @@ export class NotebookParagraphCodeEditorComponent implements OnChanges, OnDestro findInput.select(); } } - + setCursorPosition({ lineNumber, column }: IPosition) { if (this.editor) { this.editor.setPosition({ lineNumber, column });