If content is shorter than page fold, extensions cause the next page to be loaded multiple times #175

Closed
fflewddur opened this Issue Jan 19, 2015 · 9 comments

Projects

None yet

5 participants

@fflewddur

The call to reinitialize() in IAS.prototype.extension() causes the plugin to load nextUrl multiple times if currentScrollOffset >= scrollThreshold, once per each extension. I've commented out the call to reinitialize() and my extensions (noneleft and spinner) still seem to be working properly; is this call necessary after each extension is loaded?

If it is, the initialize() method will need to ensure that it isn't repeatedly loading the same URL.

@fieg
Member
fieg commented Jan 19, 2015

Ah, that's not correct, I will look in to it soon.

@JoeSchr
JoeSchr commented Jan 28, 2015

Just came upon this issue myself!

@Parthvora

I'm getting similar kind of issue.
The infinite scroll AJAX call, fires for more than one time like:
user-following?page=1
user-following?page=1
user-following?page=1

user-following?page=2
user-following?page=2

user-following?page=3
user-following?page=3

etc...

and I guess that is why I'm getting same records twice,thrice etc on same page.

After a lot of testing with various cases, I found it is something based on page "height-width"

Selectors are also correct.

Please please please help me.

@Parthvora

@fflewddur,
Hi, can you please tell me what you have commented? Is that worked? I'm getting exactly same issue.

@lukeelmers

@Parthvora I followed @fflewddur's suggestion and it worked for me too. Just comment out this.reinitialize() in IAS.prototype.extension() (line 560).

@Parthvora

Yup, its worked for me too.. thanks a lot @lukeelmers and @fflewddur

@fieg
Member
fieg commented May 8, 2015

I released a fix. You can download the latest release from http://infiniteajaxscroll.com/download.html.

@lukeelmers

Thanks @fieg -- just tested this, and everything functions as expected. Really appreciate the work you're doing here!

@fieg
Member
fieg commented May 10, 2015

👍

@fieg fieg closed this May 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment