Skip to content

Commit

Permalink
Disable in a different spot
Browse files Browse the repository at this point in the history
  • Loading branch information
joyceerhl authored Jun 22, 2021
1 parent d5a8805 commit 0f37408
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2579,6 +2579,9 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
}

setMarkupCellEditState(cellId: string, editState: CellEditState): void {
if (this.viewModel?.options.isReadOnly) {
return;
}
const cell = this.getCellById(cellId);
if (cell instanceof MarkupCellViewModel) {
cell.updateEditState(editState, 'setMarkdownCellEditState');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export class NotebookCellList extends WorkbenchList<CellViewModel> implements ID
this._localDisposableStore.add(this.view.onMouseDblClick(() => {
const focus = this.getFocusedElements()[0];

if (focus && focus.cellKind === CellKind.Markup && !focus.metadata.inputCollapsed && !this._viewModel?.options.isReadOnly) {
if (focus && focus.cellKind === CellKind.Markup && !focus.metadata.inputCollapsed) {
focus.updateEditState(CellEditState.Editing, 'dbclick');
focus.focusMode = CellFocusMode.Editor;
}
Expand Down

0 comments on commit 0f37408

Please sign in to comment.