Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventHelper.onTransitionEnd calls its handler using globalThis if globalThis.callback exists #9754

Closed
ExtAnimal opened this issue Aug 6, 2024 · 0 comments
Assignees
Labels
bug Something isn't working forum Issues from forum large-account Reported by large customer OEM OEM customer premium resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@ExtAnimal
Copy link

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 ExtAnimal added bug Something isn't working premium forum Issues from forum large-account Reported by large customer OEM OEM customer labels Aug 6, 2024
@ExtAnimal ExtAnimal self-assigned this Aug 7, 2024
@ExtAnimal ExtAnimal added the ready for review Issue is fixed, the pull request is being reviewed label Aug 7, 2024
@ExtAnimal ExtAnimal added this to the 6.0.5 milestone Aug 7, 2024
@matsbryntse matsbryntse added resolved Fixed but not yet released (available in the nightly builds) and removed ready for review Issue is fixed, the pull request is being reviewed labels Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum large-account Reported by large customer OEM OEM customer premium resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

2 participants