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

Break global Angular app styles in Firefox when ngx scrollbar becomes visible #615

Closed
korwin80 opened this issue Jun 29, 2024 · 4 comments · Fixed by #623
Closed

Break global Angular app styles in Firefox when ngx scrollbar becomes visible #615

korwin80 opened this issue Jun 29, 2024 · 4 comments · Fixed by #623
Labels
bug polyfill scroll-timeline polyfill

Comments

@korwin80
Copy link

korwin80 commented Jun 29, 2024

Reproduction

https://stackblitz.com/edit/ngx-scrollbar-ruvhwk

ngx-scrollbar-ruvhwk.zip

Actual Behavior

In Firefox, when the ngx scrollbar becomes visible, it loads https://flackr.github.io/scroll-timeline/dist/scroll-timeline.js.
Once loaded, this breaks the global styles of the Angular application.
stackblitz.com - Doesn't reproduce this because it blocks Scroll-timeline.js from loading.
I am attaching an example in a zip archive, it must be run locally.
In addition, downloading scroll-timeline.js from the Internet will not allow to use ngx-scrollbar in intranet projects.

Environment

  • Angular: 18.0.5
  • ngx-scrollbar: 15.0.1
  • Browser(s): Firefox 127.0.2
  • Operating System: Windows 10
@MurhafSousli
Copy link
Owner

MurhafSousli commented Jun 30, 2024

The problem is with the polyfill, I think this is related flackr/scroll-timeline#261

I opened an issue flackr/scroll-timeline#273

@Sweeneri
Copy link

Sweeneri commented Jul 8, 2024

Hi! I am currently experiencing this bug. Is there any short-term solution to fix this? Thanks

@MurhafSousli
Copy link
Owner

MurhafSousli commented Jul 8, 2024

Yes, actually here is a fixed version of the polyfill. use the following URL to load the polyfill.

URL: https://cdn.statically.io/gist/MurhafSousli/c852b6a672069396953f06ddd4b64620/raw/7089126915c424e85fba611d179fc5687b8743a0/scroll-timeline.js

bootstrapApplication(App, {
  providers: [
    provideScrollbarPolyfill('PATH_TO_POLYFILL')
  ]
});

@MurhafSousli MurhafSousli pinned this issue Jul 8, 2024
@MurhafSousli
Copy link
Owner

MurhafSousli commented Jul 8, 2024

Here is a fixed stackblitz that works in firefox, I will ship the modified polyfill in the next version.

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

Successfully merging a pull request may close this issue.

3 participants