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

Comments are not loading when scrolling #4375

Closed
Kristina-Dvorski opened this issue Oct 19, 2023 · 8 comments
Closed

Comments are not loading when scrolling #4375

Kristina-Dvorski opened this issue Oct 19, 2023 · 8 comments
Labels

Comments

@Kristina-Dvorski
Copy link

Expected behavior: Comments should be loaded when I am scrolling through.

Actual behavior: They are not loaded, instead I have white space.

Related Issues: Yes, but the problem is not solved. The bug is not in CSS on my side, because with normal Coral CSS the bug is also there. Please, read the following message (#4371 (comment)). I would appreciate that because, all users of my web-page have that problem and it is very unconformable.
Thank you for your time.

Versions:

  • NodeJS: 14
  • NPM: 8.0.0
  • MongoDB: 4.2
  • Redis: 3.2
  • Browser: Edge 118.0.2088.46
  • OS: Windows 11
@losowsky
Copy link
Member

Thanks Kristina for reporting this, and we're sorry this is happening. We run many variations of implementation across several CMSs and sites and aren't seeing this happen – we'll look into it more deeply soon and let you know.

@losowsky
Copy link
Member

@Kristina-Dvorski Can you also confirm you're running the latest version of Coral?

@Kristina-Dvorski
Copy link
Author

Thank you, for taking your time to check my issue. Yes I am running the latest version of Coral (8.5.3). The Bug is happening when the container with comments is on position: fixed, when I change to position: relative the container is in the Page but the bug is not there.
I hope this helps

@Kristina-Dvorski
Copy link
Author

Here's a showcase of the issue with a clean installation of Coral and no custom CSS other than what is included in the <style> tag of this page: http://159.89.1.139/
Thank you for your time

@losowsky
Copy link
Member

Thanks Kristina. We have it in our queue to look into.

@losowsky
Copy link
Member

Hi Kristin,

We've looked into it and I'm afraid we can't support putting Coral inside a fixed div due to limitations with Virtuoso. It is possible through some slightly hacky means (The Verge did something like that to make it work) but it's not something that we support out of the box.

Sorry I don't have a better answer!

@Kristina-Dvorski
Copy link
Author

Hi @losowsky,

thank you for your time and effort.

Have a nice day

@oliver-dvorski
Copy link
Contributor

oliver-dvorski commented Nov 8, 2023

For future users dealing with this bug - here's one way to patch the issue. Apparently the Virtuoso list will re-render when the browser window fires a resize event. Therefore, this makes the problem go away:

document.querySelector('.coral-scroller').addEventListener(
    'scroll',
    () => window.dispatchEvent(new Event('resize')),
    { passive: true }
);

In the above snippet, .coral-scroller would be the scrolling/overflowing element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants