未验证 提交 f2b65a96 编写于 作者: A Alex Ross 提交者: GitHub

Fix opening of tree items with keyboard (#78187)

Up until very recently, the custom tree used a TreeResourceNavigator2 with openOnSelection: true. This caused command to be executed twice on clicks though. Once on the selection and once on the click. Setting that to false caused the enter key to stop causing commands to run though. This was because the enter key was only causing the selection to trigger, not the open. The Open event was getting swallowed before it made it out of the tree because it was missing a UIEvent. Adding the UIEvent in here fixes that

Fixes #78174
上级 f2f21da8
......@@ -602,9 +602,9 @@ export class AsyncDataTree<TInput, T, TFilterData = void> implements IDisposable
return nodes.map(n => n!.element as T);
}
open(elements: T[]): void {
open(elements: T[], browserEvent?: UIEvent): void {
const nodes = elements.map(e => this.getDataNode(e));
this.tree.open(nodes);
this.tree.open(nodes, browserEvent);
}
reveal(element: T, relativeTop?: number): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册