From 9c6c0bfe11bc271a98106dc5c096f2f95127db4e Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 30 May 2016 22:28:06 +0200 Subject: [PATCH] actionbar: pass in event as part of the context --- src/vs/base/browser/ui/actionbar/actionbar.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/vs/base/browser/ui/actionbar/actionbar.ts b/src/vs/base/browser/ui/actionbar/actionbar.ts index 621537e4a18..831a81a23d0 100644 --- a/src/vs/base/browser/ui/actionbar/actionbar.ts +++ b/src/vs/base/browser/ui/actionbar/actionbar.ts @@ -135,7 +135,14 @@ export class BaseActionItem extends EventEmitter implements IActionItem { public onClick(event: Event): void { DOM.EventHelper.stop(event, true); - const context = (this._context === null || this._context === undefined) ? event : this._context; + let context: any; + if (types.isUndefinedOrNull(this._context)) { + context = event; + } else { + context = this._context; + context.event = event; + } + this._actionRunner.run(this._action, context); }