提交 a7674d53 编写于 作者: R Rob Lourens

Fix #53122 - don't focus the settings tree when navigating in the settings editor TOC

上级 56fb08bd
......@@ -272,18 +272,16 @@ export class SettingsEditor2 extends BaseEditor {
twistiePixels: 15
});
this._register(this.tocTree.onDidChangeSelection(e => {
this._register(this.tocTree.onDidChangeFocus(e => {
const element = e.focus;
if (this.searchResultModel) {
const element = e.selection[0];
this.viewState.filterToCategory = element;
this.refreshTreeAndMaintainFocus();
} else if (this.settingsTreeModel) {
const element = e.selection[0];
if (element && !e.payload.fromScroll) {
this.settingsTree.reveal(element, 0);
this.settingsTree.setSelection([element]);
this.settingsTree.setFocus(element);
this.settingsTree.domFocus();
}
}
}));
......@@ -452,8 +450,8 @@ export class SettingsEditor2 extends BaseEditor {
this.tocTree.reveal(element, 1);
}
this.tocTree.setSelection([element], { fromScroll: true });
this.tocTree.setFocus(element);
this.tocTree.setSelection([element]);
this.tocTree.setFocus(element, { fromScroll: true });
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册