Skip to content

Commit

Permalink
Fix cell toolbar getting stuck when using collapse cell (#15732)
Browse files Browse the repository at this point in the history
* fix: collapse-cell-toolbar-stuck

* Update comment wording

---------

Co-authored-by: yelipei <yelipei@qianxin.com>
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 3, 2024
1 parent 2aff9e3 commit b2f36ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cell-toolbar/src/celltoolbartracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,15 @@ export class CellToolbarTracker implements IDisposable {
}

const activeCell = notebook.activeCell;
// Change previously active cell.
this._previousActiveCell = activeCell;
if (activeCell === null || activeCell.inputHidden) {
return;
}

activeCell.model.metadataChanged.connect(this._onMetadataChanged, this);

this._addToolbar(activeCell.model);
this._previousActiveCell = activeCell;
}

get isDisposed(): boolean {
Expand Down

0 comments on commit b2f36ff

Please sign in to comment.