re #111769, dismiss only when scroll top changes.

This commit is contained in:
rebornix 2021-08-02 17:46:24 -07:00
parent af4cf38e48
commit 52414e5cd8

View file

@ -931,13 +931,16 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
this._onDidChangeVisibleRanges.fire();
}));
this._register(this._list.onDidScroll(() => {
this._register(this._list.onDidScroll((e) => {
this._onDidScroll.fire();
this._renderedEditors.forEach((editor, cell) => {
if (this.getActiveCell() === cell && editor) {
SuggestController.get(editor).cancelSuggestWidget();
}
});
if (e.scrollTop !== e.oldScrollTop) {
this._renderedEditors.forEach((editor, cell) => {
if (this.getActiveCell() === cell && editor) {
SuggestController.get(editor).cancelSuggestWidget();
}
});
}
}));
const widgetFocusTracker = DOM.trackFocus(this.getDomNode());