Skip to content

Not destroying invisible list elements when using without ui-scroll-viewport #78

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

Closed
moosi opened this issue Apr 2, 2016 · 7 comments
Closed

Comments

@moosi
Copy link

moosi commented Apr 2, 2016

I am currently facing the problem that ui-scroll is not working as expected if I don't use a fixed height with ui-scroll-viewport.

I am using the plugin for different feeds in my app. For example:

--- Top Nav ---
--- Feed ---
--- Bottom Nav ---

or

--- Top Nav ---
--- User Profile ---
--- User Feed ---
--- Bottom Nav ---

Because of this setup I need a dynamic list height. After removing ui-scroll-viewport my posts are loaded as expected when I scroll down but the DOM is growing and growing without destorying the invisible elements.

I am using version 1.3.3 with angular 1.3.2. Is there any solution for my problem?

@mfeingold
Copy link
Contributor

Can you post a repro for your problem?

Michael Feingold, President
401 Huehl RD, Suite 2A,
Northbrook, IL 60062
Email: [email protected]
Web: hill30.com http://www.hill30.com

On Sat, Apr 2, 2016 at 1:31 PM, moosi [email protected] wrote:

I am currently facing the problem that ui-scroll is not working as
expected if I don't use a fixed height with ui-scroll-viewport.

I am using the plugin in different views of my app. For example:

--- Top Nav ---
--- Feed ---
--- Bottom Nav ---

or

--- Top Nav ---
--- User Profile ---
--- User Feed ---
--- Bottom Nav ---

Because of this setup I need a dynamic list height. After removing
ui-scroll-viewport my posts are loaded as expected when I scroll down but
the DOM is growing and growing without destorying the invisible elements.

I am using version 1.3.3 with angular 1.3.2. Is there any solution for my
problem?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#78

@moosi
Copy link
Author

moosi commented Apr 4, 2016

Thank you for your fast response. I created a demo for you:

https://plnkr.co/edit/OzsoQUm0Vw8bDgoDN8ro?p=preview

@tsabbay
Copy link

tsabbay commented Apr 4, 2016

+1
same is happening in our code.

@dhilt
Copy link
Member

dhilt commented Apr 5, 2016

It defenetly can be reproduced on our Entire window scrollable demo. And the bad news is that this demo does not work for a long time. As I remember about 20 days ago we did some fix related to this demo (cause it was totally broken) but we did not check removing from DOM after this... Thanks @moosi.

I see that during scrolling down every item in the buffer has positive offset().top and
buffer[i+1].element.offset().top > buffer[i].element.offset().top
while viewportOffset().top = 0 cause we have no viewport
so clipTop() which has to remove "invisible" elements does not work.

We need to take care of this.

@dhilt
Copy link
Member

dhilt commented Apr 8, 2016

I solved the issue by clipTop/clipBottom refactoring. Now these pieces of logic are really unified and transparent. The code is in master and will be included in 1.4.1 release soon.

@moosi
Copy link
Author

moosi commented Apr 8, 2016

Thank you so much for the fast implementation! First tests were successful :)

@dhilt dhilt closed this as completed Apr 17, 2016
@dhilt
Copy link
Member

dhilt commented Apr 17, 2016

Fixed in v1.4.1.

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

4 participants