A mutationObserver event triggers an endless reset loop
lucavb opened this issue · comments
Hello,
this package is used in our confluence through Scroll Documents for Confluence and it seems that there is a potential infinite loop? I cannot really say whether that is intended or not but it feels odd?
Any how the order is the following
- child sends the parent a
mutationObserver
event - parent does not have a specific case here and so stumbles into the
default
case - parent sends the client a
reset
event - child sends the parent a
resetPage
event - parent does not have a mapping for this either and sends another
reset
event - repeat the previous two steps indefinitely
I've attached a screenshot of what the communication then looks like
Side note this also means that scrollTo
is being called every second or so. And also the version our plugin uses is somewhat outdated, so it is entirely possible that you fixed this (if it is a bug) in the meantime.
This sounds like you have miss matched version on the library in the iframe and the parent page. Normally this should still work ok, but in this case I think you need to upgrade so that they at least match.