提交 ba15ed15 编写于 作者: T t-amqi

Address comments

上级 ec745286
...@@ -244,7 +244,8 @@ export class QuickOpenWidget implements IModelProvider { ...@@ -244,7 +244,8 @@ export class QuickOpenWidget implements IModelProvider {
alwaysFocused: true, alwaysFocused: true,
verticalScrollMode: ScrollbarVisibility.Visible, verticalScrollMode: ScrollbarVisibility.Visible,
ariaLabel: nls.localize('treeAriaLabel', "Quick Picker"), ariaLabel: nls.localize('treeAriaLabel', "Quick Picker"),
keyboardSupport: this.options.keyboardSupport keyboardSupport: this.options.keyboardSupport,
preventRootFocus: true
}); });
this.treeElement = this.tree.getHTMLElement(); this.treeElement = this.tree.getHTMLElement();
......
...@@ -670,6 +670,7 @@ export interface ITreeOptions extends ITreeStyles { ...@@ -670,6 +670,7 @@ export interface ITreeOptions extends ITreeStyles {
paddingOnRow?: boolean; paddingOnRow?: boolean;
ariaLabel?: string; ariaLabel?: string;
keyboardSupport?: boolean; keyboardSupport?: boolean;
preventRootFocus?: boolean;
} }
export interface ITreeStyles { export interface ITreeStyles {
......
...@@ -444,7 +444,9 @@ export class TreeView extends HeightMap { ...@@ -444,7 +444,9 @@ export class TreeView extends HeightMap {
this.domNode = document.createElement('div'); this.domNode = document.createElement('div');
this.domNode.className = `monaco-tree no-focused-item monaco-tree-instance-${this.instance}`; this.domNode.className = `monaco-tree no-focused-item monaco-tree-instance-${this.instance}`;
this.domNode.tabIndex = container.className === 'quick-open-tree' ? -1 : 0; if (!context.options.preventRootFocus) {
this.domNode.tabIndex = 0;
}
this.styleElement = DOM.createStyleSheet(this.domNode); this.styleElement = DOM.createStyleSheet(this.domNode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册