KingSora / OverlayScrollbars

A javascript scrollbar plugin that hides the native scrollbars, provides custom styleable overlay scrollbars, and preserves the native functionality and feel.
https://kingsora.github.io/OverlayScrollbars
MIT License
3.9k stars 215 forks source link

Flashing content when scrollbars added to container #660

Closed mvalery123 closed 2 months ago

mvalery123 commented 4 months ago

Describe the bug When the content of my component becomes scrollable, it flashes the content.

To Reproduce Steps to reproduce the behavior:

Resize a component to trigger scrollbars.

Expected behavior The content does not flash.

Examples If you still need a repo let me know and I'll try to make one with the same problem. Basically I have some animation code on that big white box in the chat window:

  animation: "fadeIn 3s ease-out",
  "@keyframes fadeIn": {
    from: {
      opacity: 0,
    },
    to: {
      opacity: 1,
    },
  },

If I remove this from the big white box, it won't re-animate every time with overlay scrollbars. However I'd like to keep the animation if possible without the flash.

022-scrollbars-flashing-bug

Environment

KingSora commented 4 months ago

Good day @mvalery123 :)

I'm struggeling with reproducing the described behavior.. This would be my attempt: https://stackblitz.com/edit/overlayscrollbars-jdprqq?file=styles.css,src%2Factions.ts I'm not sure if I'm missing something here

KingSora commented 3 months ago

@mvalery123 any feedback from your side? :)

mvalery123 commented 3 months ago

Hey @KingSora ! Thanks so much for the example. I will get back to you with an update! Currently trying to figure out how to detect mobile touch scroll / touch events in overlayscrollbars events

KingSora commented 2 months ago

@mvalery123 I'll close the issue for now due to inactivity.. please feel free to re-open it or to write an update if you have progressed ok your issue