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

Lazy Table with Virtual Scroll and scrollHeight flex hides content and jumps to top on resize with Firefox #16747

Open
jase88 opened this issue Nov 14, 2024 · 4 comments
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Milestone

Comments

@jase88
Copy link
Contributor

jase88 commented Nov 14, 2024

Describe the bug

If using a lazy table with virtual scrolling and scrollHeight=flex

  <p-table
    ...
    [scrollable]="true"
    columnResizeMode="expand"
    scrollHeight="flex"
    [virtualScroll]="true"
    [virtualScrollOptions]="{ showLoader: false, showSpacer: false }"
    [virtualScrollDelay]="0"
    [resetPageOnSort]="false"
    [lazy]="true"
    [tableStyle]="{ 'table-layout': 'fixed' }"
  >

on Firefox the content is hidden and the scrolling jumps to the top if resizing.
This only occurs if scrolling a bit within the table. If kept in initial scrolling state resizing works fine.

PrimeNG-Lazy-Table-VirtualScrolling-scrollHeight-flex-Firefox.mov

After Scrolling again the content reappears.

Environment

MacOS 15.1
Firefox 132.0.2

Reproducer

https://github.com/jase88/primeng-table-scrollheight-flex-firefox

Angular version

18.2.0

PrimeNG version

17.18.12

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

22.8.0

Browser(s)

Firefox 132.0.2

Steps to reproduce the behavior

  1. Checkout https://github.com/jase88/primeng-table-scrollheight-flex-firefox
  2. Run npm install && npm run start
  3. Open localhost:4200 on Firefox
  4. Scroll table a bit
  5. Resize table

Expected behavior

  • Table should not jump to the top
  • Table should be displayed properly
@jase88 jase88 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 14, 2024
@mertsincan
Copy link
Member

Hi,

Does it work with Chrome or others? and, could you please try it with v18?

@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 19, 2024
@mertsincan mertsincan added this to the 17.18.13 milestone Nov 19, 2024
@jase88
Copy link
Contributor Author

jase88 commented Nov 19, 2024

It does work fine on Chrome/Chromium based browsers and Safari. As far as I can see after initial debugging, no scroll event is emitted in Firefox (Scroller component), whereas this is the case with the other browsers.

I will test it with PrimeNG 18 RC1 and report soon

@jase88
Copy link
Contributor Author

jase88 commented Nov 19, 2024

@mertsincan
There seems to be further errors with 18rc1 - I migrated my reproduction example on this branch:
https://github.com/jase88/primeng-table-scrollheight-flex-firefox/tree/18.0.0-rc.1

If [virtualScroll]=true is set, no items are displayed at all within the tbody. If setting [virtualScroll]=false the content is displayed, but a NG0100: ExpressionChangedAfterItHasBeenCheckedError error occurs.

Should I create two new bug issues for 18rc1?

@mertsincan mertsincan modified the milestones: 17.18.13, 17.x Dec 9, 2024
@jase88
Copy link
Contributor Author

jase88 commented Dec 17, 2024

That the table with virtual items is not working on v18/19 is tracked here: #17102

I guess that the bug of this ticket is still present in v19, because the scroller Implementation didn't change at that point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
Status: No status
Development

No branches or pull requests

2 participants