New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Comments

Projects
None yet
5 participants
@fflewddur

fflewddur commented Jan 19, 2015

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

This comment has been minimized.

Member

fieg commented Jan 19, 2015

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

@JoeSchr

This comment has been minimized.

JoeSchr commented Jan 28, 2015

Just came upon this issue myself!

@Parthvora

This comment has been minimized.

Parthvora commented Mar 13, 2015

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

This comment has been minimized.

Parthvora commented Mar 13, 2015

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

@lukeelmers

This comment has been minimized.

lukeelmers commented Mar 13, 2015

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

@Parthvora

This comment has been minimized.

Parthvora commented Mar 14, 2015

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

@fieg

This comment has been minimized.

Member

fieg commented May 8, 2015

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

@lukeelmers

This comment has been minimized.

lukeelmers commented May 9, 2015

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

@fieg

This comment has been minimized.

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