Skip to content

Don't scroll to top slide when adding items inside ng-repeat #17

Open

Description

@haplo31

Hello,
I have a page with 3 sections and the last of them contains a list of items.
I need to add some new items to this list but when I do, fullpage scrolls to the top slide of the page.
I can't find a way to avoid this behavior and I started to think it may be not doable...

I did a plunker to show the problem:
https://plnkr.co/edit/sVOIuGzhawS1yMn6P6tr?p=preview

Is there a solution to prevent the scroll to happen or, at least, to scroll back to the previous slide after the reload?

Thanks for your time!

Activity

  1. hellsan631 commented on Jun 25, 2016

    @hellsan631
    Owner

    if you are adding in the sections dynamically with angular, or changing the options, then unfortunately I don't think there isn't a way currently to avoid the behavior. I will see if $.fullpage.reBuild() got any changes or updates, but currently,when you add/remove items, the plugin has to destroy and add itself again.

  2. haplo31 commented on Jun 29, 2016

    @haplo31
    Author

    Thanks for your answer.
    I managed to bypass the problem by changing the rebuilt function in your directive.
    I use your original code for the first call and $.fullpage.reBuild() after that and it seems to work, no more reload of the page when I add something in my ng-repeat.

    However, my work is still not done because I seem to be unable to scroll to the bottom of the page after that, with or without my modification in your directive
    FullpageJs doesn't seem to have a function for that and the usuals methods doesn't work...
    Do you know a way to scroll to the bottom of a page where fullpage is active?

    Thanks again for your time!

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