Skip to content

ngClick is invoked when scrolling#25

Description

@bugwelle

Hello,
I'm using angular-scrolly in a PhoneGap app and it's working quite well 馃憤
Only one problem. Sometimes when scrolling it happens that the ngClick directive of ngTouch is invoked.

I fixed this for me by inserting

if (self.state.distance.y > 20 || self.state.distance.y < -20) {
    e.preventDefault();
}

before https://github.com/ajoslin/angular-scrolly/blob/master/src/services/dragger.js#L280 (line 280)

I'm checking whether the users scrolls more than 20 pixels. I know there has to be a better solution but I'm not very familiar with the angular-scrolly code... :)

Regards,
Andre

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions