Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blur cell on shift+enter, only update cell height when changed #14277

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,10 @@ export class NotebookCellModel implements NotebookCell, Disposable {
}

set cellHeight(height: number) {
this.onDidCellHeightChangeEmitter.fire(height);
this._cellheight = height;
if (height !== this._cellheight) {
this.onDidCellHeightChangeEmitter.fire(height);
this._cellheight = height;
}
}

@postConstruct()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class CellEditor extends React.Component<CellEditorProps, {}> {

this.toDispose.push(this.props.notebookModel.onDidChangeSelectedCell(e => {
if (e.cell !== this.props.cell && this.editor?.getControl().hasTextFocus()) {
this.props.notebookContextManager.context?.focus();
e.cell?.requestFocusEditor();
}
}));
if (!this.props.notebookViewportService || (this.container && this.props.notebookViewportService.isElementInViewport(this.container))) {
Expand Down
Loading