We have many places in amp-story code that add an event listener but do not remove it. For this, we can refactor to use listenOnce.
This issue hasn't been updated in awhile. Do you have any updates?
This is a code cleanup that can happen during a fixit.
I can work on this one
Sure! Thanks @juanlizarazo!
@newmuis I attempted to use listenOnce but that one removes the listener as soon as the event is received, it just executes each handler once for each event, e.g. next page would work just once.
So instead, I refactored this with listen and stored the unlisteners than then are called in unlayoutCallback.
PR #17004 is ready for review.
c.c. @mrjoro
After looking at @juanlizarazo's investigation, I think we actually don't want the behavior mentioned in the original report at all. Closing this issue.