StatusBar onClick not working

HI ,

I am have custom progress statusbarItem

export class CustomProgressStatusBarItem extends ProgressStatusBarItem {
 @inject(BackgroundProcessService) private readonly backgroundProcessService: BackgroundProcessService;

    protected update(progressId: string | undefined): void {
        const message = progressId && this.messagesByProgress.get(progressId);
        if (!progressId || !message) {
        const text = `$(refresh~spin) ${message}`;
        this.statusBar.setElement(, {
            alignment: StatusBarAlignment.LEFT,
            priority: 1,
            tooltip: 'Show details',
             onclick: ()=> {

But due to this change,the event generated on click of statusbar is pointerEvent which is not a MouseEvent. Am I doing something wrong or I need to use CommandId instead of onClick ?

Hmh…first off: MouseEvent is an interface, but interfaces get erased in compilation. So how would this even work. Then: PointerEvent is a sub-interface of MouseEvent, so if the instanceof would work, it would be correct.

In conclusion, this looks like a bug to me, please open an issue. If you have an example, you can share, that would be super.

1 Like

Thanks @tsmaeder , I have filled an issue StatusBar onClick function not called with latest update v1.25.0 · Issue #11116 · eclipse-theia/theia (