提交 8f56013e 编写于 作者: R Rob Lourens

Fix #67757

上级 8020bdcf
......@@ -549,24 +549,25 @@ export class SettingsEditor2 extends BaseEditor {
this.viewState));
this._register(this.tocTree.onDidChangeFocus(e => {
setTimeout(() => {
const element: SettingsTreeGroupElement = e.elements[0];
if (this.tocFocusedElement === e.elements[0]) {
return;
}
const element: SettingsTreeGroupElement = e.elements[0];
if (this.tocFocusedElement === element) {
return;
}
this.tocFocusedElement = element;
this.tocTree.setSelection(e.elements);
if (this.searchResultModel) {
if (this.viewState.filterToCategory !== element) {
this.viewState.filterToCategory = element;
this.tocFocusedElement = element;
this.tocTree.setSelection(element ? [element] : []);
if (this.searchResultModel) {
if (this.viewState.filterToCategory !== element) {
this.viewState.filterToCategory = element;
// see https://github.com/Microsoft/vscode/issues/66796
setTimeout(() => {
this.renderTree();
this.settingsTree.scrollTop = 0;
}
} else if (element && (!e.browserEvent || !(<any>e.browserEvent).fromScroll)) {
this.settingsTree.reveal(element, 0);
}, 0);
}
}, 0);
} else if (element && (!e.browserEvent || !(<any>e.browserEvent).fromScroll)) {
this.settingsTree.reveal(element, 0);
}
}));
this._register(this.tocTree.onDidFocus(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册