Bug 186480 - IntersectionObserver freezes safari on localhost
Summary: IntersectionObserver freezes safari on localhost
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 11
Hardware: Unspecified Unspecified
: P2 Trivial
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-11 00:13 PDT by Markus
Modified: 2023-08-13 12:28 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus 2018-06-11 00:13:25 PDT
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
Comment 1 Simon Fraser (smfr) 2018-06-11 10:55:44 PDT
What browser are you reporting this against? Safari doesn't support IntersectionObserver.
Comment 2 Markus 2018-06-12 00:05:21 PDT
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
Comment 3 Simon Fraser (smfr) 2018-06-13 16:38:41 PDT
So you're saying that the polyfill triggers the hang?
Comment 4 Simon Fraser (smfr) 2018-06-13 19:09:51 PDT
Also where is a live URL we can test with?
Comment 5 Markus 2018-06-14 05:55:18 PDT
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).
Comment 6 Ahmad Saleem 2023-08-13 10:47:37 PDT
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?