Listeners are being fired immediately when calling emit() when the listener is defined on the same component, which they shouldn't.

Description

Template:

Component:

When calling emit(), there is a section of the code that is firing the listener immediately if it exists.

ComponentEngine.cfc

This shouldn't happen though.

The emit event name should simply be returned in the JSON response for the request and then ANOTHER AJAX request should fire to execute the listener.

The other issue is that FireEvent.cfc is calling emit() again.

This should be changed to something like this.

Activity

Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created December 28, 2022 at 5:10 PM
Updated January 8, 2023 at 2:16 PM
Resolved January 8, 2023 at 2:16 PM