Bug 186480
| Summary: | IntersectionObserver freezes safari on localhost | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Markus <markus> |
| Component: | UI Events | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Trivial | CC: | ahmad.saleem792, ap, simon.fraser |
| Priority: | P2 | ||
| Version: | Safari 11 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Markus
Started by posting the issue here https://github.com/w3c/IntersectionObserver/issues/302#issuecomment-395895715
Problem only occurs on localhost
const IntersectionObserverOptions = {
rootMargin: '0px 0px 800px 0px',
threshold: 0.0
};
this.iIntersectionObserver = new IntersectionObserver(entries => {
if (entries[0].intersectionRatio <= 0) { return; }
if (entries[0].isIntersecting) {
this.iIntersectionObserver.unobserve(entries[0].target);
this.loadMoreProducts.emit();
}
}, IntersectionObserverOptions);
removing this makes the page load properly
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Simon Fraser (smfr)
What browser are you reporting this against? Safari doesn't support IntersectionObserver.
Markus
The issue I first filed at the pollyfill repo.. they told me to file it here. :/
https://github.com/w3c/IntersectionObserver/issues/302#issuecomment-395895715
Simon Fraser (smfr)
So you're saying that the polyfill triggers the hang?
Simon Fraser (smfr)
Also where is a live URL we can test with?
Markus
Well I can't provide a link for you to test a localhost issue :P
I have been trying to create a minimal repo but I ran in to problems (unrelated to the issue).
Ahmad Saleem
It seems the user left comment on GitHub repo (on Comment 02):
"FYI this was due to missing POLL_INTERVAL setting... once set it worked locally.. but performance get's super bad when navigating the site..."
So it seems it was issue on polyfill side from end-user, can we close this? @Simon - any thoughts?