support icon indicating copy to clipboard operation
support copied to clipboard

EventHelper.onTransitionEnd calls its handler using `globalThis` if `globalThis.callback` exists

Open ExtAnimal opened this issue 1 year ago • 0 comments

Forum post

The code which executes the callback just checks for presence of thisObj.callback. If that exists on window, then it will be called.

We should only use that is the thisObj is an instance of our Base class:

Should be

            doCallback        = () => {
                detacher();
                if (!thisObj.isDestroyed) {
                    if (thisObj.$meta?.class.isBase) { // <-- The fix. If it is an instance of our Base class
                        thisObj.callback(handler, thisObj, callbackArgs);
                    }
                    else {
                        handler.apply(thisObj, callbackArgs);
                    }
                }
            },

ExtAnimal avatar Aug 06 '24 06:08 ExtAnimal