From 277f465c50b9b05264a2d7b47d95638f3725d632 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 14 Sep 2021 13:23:17 -0600 Subject: [PATCH] Fix onclick to keep originally bound click handler context. Fixes app.appname.func callbacks had widget as context --- api/js/etemplate/Et2Widget/Et2Widget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Widget/Et2Widget.ts b/api/js/etemplate/Et2Widget/Et2Widget.ts index e8e7b69da2..77f482e080 100644 --- a/api/js/etemplate/Et2Widget/Et2Widget.ts +++ b/api/js/etemplate/Et2Widget/Et2Widget.ts @@ -234,7 +234,7 @@ const Et2WidgetMixin = (superClass) => var args = Array.prototype.slice.call(arguments); if(args.indexOf(this) == -1) args.splice(1, 0, this); - return this.onclick.apply(this, args); + return this.onclick(...args); } return true;