提交 a8449c4f 编写于 作者: R Ramya Achutha Rao

Set focus only after widget is shown to avoid showing details too soon

上级 85ac36ee
......@@ -653,15 +653,8 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
this.show();
break;
case State.Open:
hide(this.messageElement);
hide(this.messageElement, this.details.element);
show(this.listElement);
if (this.expandDocsSettingFromStorage()
&& canExpandCompletionItem(this.list.getFocusedElements()[0])) {
show(this.details.element);
this.expandSideOrBelow();
} else {
hide(this.details.element);
}
this.show();
break;
case State.Frozen:
......@@ -741,7 +734,6 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
this.focusedItem = null;
this.focusedItemIndex = null;
this.list.splice(0, this.list.length, this.completionModel.items);
this.list.setFocus([selectionIndex]);
this.list.reveal(selectionIndex, selectionIndex);
if (isFrozen) {
......@@ -750,6 +742,8 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
this.setState(State.Open);
}
this.list.setFocus([selectionIndex]);
// Reset focus border
if (this.detailsBorderColor) {
this.details.element.style.borderColor = this.detailsBorderColor;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册