提交 f73ee4be 编写于 作者: J Joao Moreno

tree,list: ignore pointer events on input elements

fixes #68016
上级 ffa778a3
......@@ -559,6 +559,10 @@ export class MouseController<T> implements IDisposable {
}
protected onPointer(e: IListMouseEvent<T>): void {
if (isInputElement(e.browserEvent.target as HTMLElement)) {
return;
}
let reference = this.list.getFocus()[0];
const selection = this.list.getSelection();
reference = reference === undefined ? selection[0] : reference;
......@@ -591,6 +595,10 @@ export class MouseController<T> implements IDisposable {
}
private onDoubleClick(e: IListMouseEvent<T>): void {
if (isInputElement(e.browserEvent.target as HTMLElement)) {
return;
}
if (this.multipleSelectionSupport && this.isSelectionChangeEvent(e)) {
return;
}
......
......@@ -805,6 +805,10 @@ class TreeNodeListMouseController<T, TFilterData, TRef> extends MouseController<
}
protected onPointer(e: IListMouseEvent<ITreeNode<T, TFilterData>>): void {
if (isInputElement(e.browserEvent.target as HTMLElement)) {
return;
}
const node = e.element;
if (!node) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册