Project: titanium
Issue TIMOB-20030: iOS: Repeated call of listView.addEventListener('scrollstart') should only result in 1 listener
h5. Current behavior With {code} listView.addEventListener('scrollstart', this.myCallback); {code} you can register an event listener. But there is no check if the listener is already registered. So if you do something like this: {code} function attach() { listView.addEventListener('scrollstart', this.myCallback); } attach(); // // Lots of code or loop or async callback between // attach(); {code} you habe a second registered callback. You have todo something like this to unregister: {code} listView.removeEventListener('scrollstart', this.myCallback); listView.removeEventListener('scrollstart', this.myCallback); {code} Its difficult to debug problems around that if you overlooked the second call of addEventListener. h5. Expected - The second listener is not registered - (optional) Warning or notice that there is already a listener
Story points: 5