Ngx-infinite-scroll: Broken on Safari 9.1.1 on Mac

Created on 6 Jul 2016  路  5Comments  路  Source: orizens/ngx-infinite-scroll

While it works fine on Chrome, it just doesn't load more on Safari. Not in the plunkr, nor in the echoes.

Looking at the other issues, you seem to be testing with Safari, too _confused_

bug

Most helpful comment

Thanks a lot for fixing this. It's working well :)

All 5 comments

hi @t1
thanks for reporting.
for a bug fix - it seems like the "height" code (as well as other properties on the window) breaks the js flow and returns an error. This eventually breaks the calculations function.
a possible fix - is checking for

elem.hasOwnProperty('offsetHeight')

and then, perhaps use:

window.document.body.offsetHeight

this should be done for all window properties that are retrieved for calculations.

Good Reference

@orizens: I'm quite new to js, and try to stick to things like Angular ;-) But you seem to know exactly what would have to be done. Do you think you will be able to find the time to do it? And maybe even can say, when this might be?

Hi, what's the status of this bug?
It's not working on iPhone as well.

This looks like a quickfix according to your answer.
Is the problem that elem[property] doesn't work on safari at all, or only if the elem is window?

It's nicer to have this fixed in the master branch because I believe most of us are using npm to install the dependencies and it gives us the compiled version, which is not very nice to fix.

hi @freezing
bug is still opened. fix is not that simple but hope i will have time for it soon.

Thanks a lot for fixing this. It's working well :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kukiel picture kukiel  路  5Comments

elvisbegovic picture elvisbegovic  路  5Comments

atineo picture atineo  路  5Comments

Cuberice picture Cuberice  路  3Comments

sharmilemurugaraj picture sharmilemurugaraj  路  5Comments