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

Fix #37556

上级 6681c86c
......@@ -21,7 +21,7 @@ import { IAction, Action } from 'vs/base/common/actions';
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { Dimension, Builder, $ } from 'vs/base/browser/builder';
import { FindInput } from 'vs/base/browser/ui/findinput/findInput';
import { ITree } from 'vs/base/parts/tree/browser/tree';
import { ITree, IFocusEvent } from 'vs/base/parts/tree/browser/tree';
import { Tree } from 'vs/base/parts/tree/browser/treeImpl';
import { Scope } from 'vs/workbench/common/memento';
import { IPreferencesService } from 'vs/workbench/parts/preferences/common/preferences';
......@@ -522,9 +522,9 @@ export class SearchViewlet extends Viewlet {
}
}));
this.toUnbind.push(this.tree.onDOMFocus(e => {
const focus = this.tree.getFocus();
this.firstMatchFocused.set(this.tree.getNavigator().first() === this.tree.getFocus());
this.toUnbind.push(this.tree.addListener('focus', (e: IFocusEvent) => {
const focus = e.focus;
this.firstMatchFocused.set(this.tree.getNavigator().first() === focus);
this.fileMatchOrMatchFocused.set(true);
this.fileMatchFocused.set(focus instanceof FileMatch);
this.matchFocused.set(focus instanceof Match);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册