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

Virtual scroll has a scroll size limit #14990

Open
ernestbofill opened this issue Jan 29, 2019 · 6 comments
Open

Virtual scroll has a scroll size limit #14990

ernestbofill opened this issue Jan 29, 2019 · 6 comments
Labels
area: cdk/scrolling P5 The team acknowledges the request but does not plan to address it, it remains open for discussion

Comments

@ernestbofill
Copy link

ernestbofill commented Jan 29, 2019

What is the expected behavior?

The scroll is next to unlimited in its length

What is the current behavior?

Scrolling reaches it's limit at 3.3553e7px

What are the steps to reproduce?

There should be 1 Million items 191739 are reachable
https://stackblitz.com/edit/angular-material2-issue-mlhd9q

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

    "@angular/cdk": "7.0.2",
    "@angular/core": "7.0.1",

Google Chrome
Version 71.0.3578.98 (Official Build) (64-bit)

Is there anything else we should know?

It doesn't seem to be a browser limit. I have been able to create a larger scroll area than the limit above and also successfully used translateY() with a greater value.'


UPDATE:
I tried to debug it and found out the culprit is in the measureScrollOffset(): it starts to return wrong values at around 50.000.000px

https://github.com/angular/material2/blob/b51f14350200d1d0e9ad8c96485fd6dfe6e7a180/src/cdk/scrolling/scrollable.ts#L148

el.scrollTop returns a wrong value.

@ernestbofill ernestbofill changed the title Virtual scroll has a scroll limit (and it's not that large) Virtual scroll has a scroll size limit Feb 1, 2019
@mmalerba mmalerba added this to To do in Virtual scrolling via automation Feb 6, 2019
@mmalerba mmalerba added the P5 The team acknowledges the request but does not plan to address it, it remains open for discussion label Feb 6, 2019
@mmalerba
Copy link
Contributor

mmalerba commented Feb 6, 2019

I've marked this as P5 because I'm not sure if it is feasible due to the incorrect measurements the browser reports

@ernestbofill
Copy link
Author

I find it strange that the issue reproduces in any browser that I tested. Is this a known issue?

@mmalerba
Copy link
Contributor

mmalerba commented Feb 7, 2019

Yes, browsers have limits on the size of elements. It would be possible to work around those limits by stacking multiple elements, except that the limit also appears to apply to scrollHeight/scrollTop https://jsfiddle.net/malerba89/gbzwrcuv/

@manju-reddys
Copy link

I wrote blog and implemented a solution to this issue: Read here

@kevhof
Copy link

kevhof commented Mar 22, 2023

Are you planning to address this issue soon given that a solution was provided? It's been 3 years now.

@wagnermaciel
Copy link
Contributor

@kevhof Hi, this is a very low priority issue and we are a small team so we haven't been able to dedicate any time to looking into this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cdk/scrolling P5 The team acknowledges the request but does not plan to address it, it remains open for discussion
Projects
Development

No branches or pull requests

6 participants