Skip to content
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

No check for the Integerity of infinite-scroll-distance (Issue with scroll on android devices ). nginfinitescroll version: 1.0.0 #359

Open
maximusDreddoff opened this issue Mar 24, 2017 · 2 comments

Comments

@maximusDreddoff
Copy link

maximusDreddoff commented Mar 24, 2017

I have faced with scroll problems on my android device (xiaomi redmi note 4) when set attr infinite-scroll-distance = '0.5'

I am using angular 1.4.2

And there is no check for Integerity in your library(version 1.0.0):

    scrollDistance = 0;
        if (attrs.infiniteScrollDistance != null) {
          scope.$watch(attrs.infiniteScrollDistance, function(value) {
            return scrollDistance = parseInt(value, 10);
          });

so I had to change it to :


if (attrs.infiniteScrollDistance != null) {
                    scope.$watch(attrs.infiniteScrollDistance, function (value) {
                        return scrollDistance = parseFloat(value);
                    });
                }

@graingert
Copy link
Collaborator

@maximusDreddoff ah parseFloat would be way better, can you create a PR?

@maximusDreddoff
Copy link
Author

maximusDreddoff commented Mar 24, 2017

@graingert yep, of course. I will try to create on Monday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants