[AC-1048] View.addEventListener doesn't always add an event listener
|Resolution||Needs more info|
|Components||Titanium SDK & CLI|
|Labels||TCSupportTriage, addeventlistener, fireevent|
DescriptionSometimes View.addEventListener doesn't actually add the event listener to the object. Sometimes fireEvent doesn't fire the event, even when the event is added properly. While I'm able to consistently reproduce this error, the circumstances required to reproduce it aren't clear. Debugging into addEventListener revealed that when the error occurs, the event is added to the "listeners" with a value of 0 instead of 1. When a subsequent fireEvent is called for the same event, hasListeners returns 0, and no event is fired. The events that are failing are being added to a view that is never displayed. It is created with no properties and is only used for the sake of event management. I've also encountered cases when fireEvent fails despite hasListeners returning 1. Debugging into fireEvent revealed that in this case [proxyView interactionEnabled] is returning false. This should not be the case since the view object that the events are being added to and fired from is the same view, property-less view I previously described. I never set view.touchEnabled = false for this view, nor do I ever add this view to anything. When I can produce an isolated set of code that reproduces the issue, I will add it to this report.
- Mauro Parra-Miranda 2014-12-09 Hello! We tried a simple event listener over a view, and looks like working. If you find a testcase where we can reproduce this issue, please post it. Best Regards