You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[labs/observers] IntersectionController.observe should restore the observed target on reconnect #2902
If you init an IntersectionController with a target (oldTarget), and then observe another target with IntersectionController.observe(newTarget) (meaning to override oldTarget), if the host is disconnected then reconnected, then oldTarget is the only target that is observed and not newTarget.
Steps to Reproduce
Init an intersectionObserver with a target
call IntersectionObserver.observe with a new target
disconnect the custom element
reconnect the custom element
note that the instersectionController is only being called with the old target
scroll around again and observe only outsideDiv is being called
Expected Results
After reconnect, target: intendedTarget should be logged.
Personally I think there should be a way to unobserve the constructor's target, but if not, calling this.observe(A) should re-observe on element A on host reconnect
Actual Results
After reconnect, only target: oldTarget is logged.
changed the title [-][labs/observers] IntersectionController.observe should restore the observed target on reconnect[/-][+][@lit-labs/observers] IntersectionController.observe should restore the observed target on reconnect[/+]on May 14, 2022
changed the title [-][@lit-labs/observers] IntersectionController.observe should restore the observed target on reconnect[/-][+][labs/observers] IntersectionController.observe should restore the observed target on reconnect[/+]on Jun 16, 2022
Activity
[-][labs/observers] IntersectionController.observe should restore the observed target on reconnect[/-][+][@lit-labs/observers] IntersectionController.observe should restore the observed target on reconnect[/+][-][@lit-labs/observers] IntersectionController.observe should restore the observed target on reconnect[/-][+][labs/observers] IntersectionController.observe should restore the observed target on reconnect[/+][labs/observers] observed targets are re-observed when the host is re…
Update rethink scroll to (#3482)