actionbar: pass in event as part of the context

This commit is contained in:
isidor
2016-05-30 22:28:06 +02:00
parent 8bee53a9da
commit 9c6c0bfe11
@@ -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);
}