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

bug: global trigger doesn't transfer arguments #584

Open
Vadim-Eryomin opened this issue Jan 12, 2025 · 0 comments
Open

bug: global trigger doesn't transfer arguments #584

Vadim-Eryomin opened this issue Jan 12, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Vadim-Eryomin
Copy link

Describe the bug

global trigger does not pass arguments along with the object

Version

v3001.0.6

To Reproduce

Steps to reproduce the behavior:

//following code shows reproduction of bug
// use explicit trigger for every element - will log 12 into console
add(["a"])
onMouseMove(() => get("a").forEach(e => e.trigger("abc", 12)))
on("abc", "a", (obj, numbers) => console.log(numbers));

// use global trigger from last feature will log "undefined"
add(["b"])
onMouseMove(() => trigger("abc", "b", 1234))
on("abc", "b", (obj, numbers) => console.log(numbers));

Expected behavior

global trigger passes arguments as it seems to do

Screenshots

possible place where all go wrong - last feature commit src/events/globalEvents.ts
(...args: any[] should be used, isn't it?)
{56AD339D-762B-4F23-85A6-C7641CEAD847}

@Vadim-Eryomin Vadim-Eryomin added the bug Something isn't working label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: TODO
Development

No branches or pull requests

1 participant