Current method will leak handlers.
gnarf opened this issue · 3 comments
gnarf commented
If an element is replaced or removed, it's handlers will still be added to the transition states.
We may want to make a single handler for each event type that walks elements/their parents(if these events bubble) to determine if they have relevant events they want fired, rather than attaching each event as it's own transition state handler.
tbranyen commented
Good catch, I was thinking for some reason that diffHTML already unregistered transition hooks when elements were removed, but after looking again realized that doesn't make sense. Transition states aren't tied to any specific element, so we need to listen to the replaced and detached hooks in this lib as well to properly unbind them.