Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
4.0.1, 4.1.0
-
None
-
3
-
Tiger Sprint 139
Description
The current DOM MutationObserver in the OverlaySyncService can easily lead to infinite loops. For example, when a website has a resize callback that mutates the DOM (e.g. set the height of an element) this will trigger the MutationObserver callback, which in turns re-calculates the height of the iframe and subsequently triggering another resize event in the website, starting the infinite loop.
After trying out different solutions (simply checking if the width/height of the site has changed, or fixing the script in the website to only cause a DOM mutation when necessary) it became clear that the list of MutationRecords provided by the MutationObserver is always the same when we are in the loop. This allows for a generic fix that only triggers a redraw in the ChannelManager overlay if the current list of MutationRecords differers from the previous list.
For a more thorough explanation, please see the linked HIPCON-2018 issue.
Attachments
Issue Links
- clones
-
CHANNELMGR-855 MutationObserver in OverlaySyncService should filter out duplicate callbacks
- Closed