Skip to:
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.
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.