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

Fix #67073 - hide fancy selectbox when scrolling settings

上级 aad260bc
......@@ -605,9 +605,9 @@ export class SettingsEditor2 extends BaseEditor {
this.settingRenderers.allRenderers));
this.settingsTree.getHTMLElement().attributes.removeNamedItem('tabindex');
// this._register(this.settingsTree.onDidScroll(() => {
// this.updateTreeScrollSync();
// }));
this._register(this.settingsTree.onDidScroll(() => {
this.updateTreeScrollSync();
}));
}
private notifyNoSaveNeeded() {
......@@ -644,36 +644,29 @@ export class SettingsEditor2 extends BaseEditor {
// this.updateTreePagingByScroll();
const element = this.tocTreeModel.children[0];
// const element = this.tocTreeModel.children[0];
// const elementToSync = this.settingsTree.getFirstVisibleElement();
// const element = elementToSync instanceof SettingsTreeSettingElement ? elementToSync.parent :
// elementToSync instanceof SettingsTreeGroupElement ? elementToSync :
// null;
if (element && this.tocTree.getSelection()[0] !== element) {
// this.tocTree.reveal(element);
// const elementTop = this.tocTree.getRelativeTop(element);
// collapseAll(this.tocTree, element);
// if (elementTop < 0 || elementTop > 1) {
// this.tocTree.reveal(element);
// } else {
// this.tocTree.reveal(element, elementTop);
// }
// this.tocTree.expand(element);
// this.tocTree.setSelection([element]);
// this.tocTree.setFocus(element, { fromScroll: true });
}
// if (element && this.tocTree.getSelection()[0] !== element) {
// this.tocTree.reveal(element);
// const elementTop = this.tocTree.getRelativeTop(element);
// collapseAll(this.tocTree, element);
// if (elementTop < 0 || elementTop > 1) {
// this.tocTree.reveal(element);
// } else {
// this.tocTree.reveal(element, elementTop);
// }
// this.tocTree.expand(element);
// this.tocTree.setSelection([element]);
// this.tocTree.setFocus(element, { fromScroll: true });
// }
}
// private updateTreePagingByScroll(): void {
// const lastVisibleElement = this.settingsTree.getLastVisibleElement();
// if (lastVisibleElement && this.settingsTreeDataSource.pageTo(lastVisibleElement.index)) {
// this.renderTree();
// }
// }
private updateChangedSetting(key: string, value: any): Promise<void> {
// ConfigurationService displays the error if this fails.
// Force a render afterwards because onDidConfigurationUpdate doesn't fire if the update doesn't result in an effective setting value change
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册