Skip to content

fix(KTL-1177): Resize Observer has indefinite loop#3116

Merged
zoobestik merged 2 commits intomasterfrom
ktl-1177-indefinite-loop
Sep 5, 2023
Merged

fix(KTL-1177): Resize Observer has indefinite loop#3116
zoobestik merged 2 commits intomasterfrom
ktl-1177-indefinite-loop

Conversation

@zoobestik
Copy link
Copy Markdown
Contributor

symbol wrapper script in dokka has Infinity cycling code based on observe/unobserve inside resize handler.

MRE:

const observer = new ResizeObserver(entries => entries.forEach({ target } => {
  observer.unobserve(target);
  observer.observe(target); // fire re-call this ResizeObserver handler
}));

document.querySelectorAll('...').forEach(item => observer.observe(item));

@zoobestik zoobestik force-pushed the ktl-1177-indefinite-loop branch from cbc5f63 to f94a240 Compare September 4, 2023 15:31
Copy link
Copy Markdown
Contributor

@IgnatBeresnev IgnatBeresnev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants