提交 4fa70ef0 编写于 作者: S Sandeep Somavarapu

Fix #23174

上级 106b6cbc
......@@ -141,9 +141,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
this.overlayContainer.style.height = dimension.height + 'px';
this.defineKeybindingWidget.layout(this.dimension);
const listHeight = dimension.height - (DOM.getDomNodePagePosition(this.headerContainer).height + 12 /*padding*/);
this.keybindingsListContainer.style.height = `${listHeight}px`;
this.keybindingsList.layout(listHeight);
this.layoutKebindingsList();
}
focus(): void {
......@@ -294,7 +292,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
private renderKeybindingsEntries(keybindingsEntries: IKeybindingItemEntry[]): void {
this.listEntries = [{ id: 'keybinding-header-entry', templateId: KEYBINDING_HEADER_TEMPLATE_ID }, ...keybindingsEntries];
this.keybindingsList.splice(0, this.keybindingsList.length, this.listEntries);
this.keybindingsList.layout(this.dimension.height - DOM.getDomNodePagePosition(this.headerContainer).height);
this.layoutKebindingsList();
if (this.keybindingItemToReveal) {
this.focusEntry(this.keybindingItemToReveal, true);
......@@ -302,6 +300,12 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
}
}
private layoutKebindingsList(): void {
const listHeight = this.dimension.height - (DOM.getDomNodePagePosition(this.headerContainer).height + 12 /*padding*/);
this.keybindingsListContainer.style.height = `${listHeight}px`;
this.keybindingsList.layout(listHeight);
}
private focusEntry(keybindingItemEntry: IKeybindingItemEntry, reveal: boolean): void {
let index = -1;
for (let i = 0; i < this.listEntries.length; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册