提交 102f6d3a 编写于 作者: S SteVen Batten

fixes #94872

上级 27ada910
......@@ -178,17 +178,7 @@ export class BaseActionViewItem extends Disposable implements IActionViewItem {
onClick(event: DOM.EventLike): void {
DOM.EventHelper.stop(event, true);
let context: any;
if (types.isUndefinedOrNull(this._context)) {
context = event;
} else {
context = this._context;
if (types.isObject(context)) {
context.event = event;
}
}
const context = types.isUndefinedOrNull(this._context) ? undefined : this._context;
this.actionRunner.run(this._action, context);
}
......
......@@ -192,7 +192,7 @@ class NativeContextMenuService extends Disposable implements IContextMenuService
private async runAction(actionRunner: IActionRunner, actionToRun: IAction, delegate: IContextMenuDelegate, event: IContextMenuEvent): Promise<void> {
this.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: actionToRun.id, from: 'contextMenu' });
const context = delegate.getActionsContext ? delegate.getActionsContext(event) : event;
const context = delegate.getActionsContext ? delegate.getActionsContext(event) : undefined;
const runnable = actionRunner.run(actionToRun, context);
if (runnable) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册