dixonandmoe / rellax

Lightweight, vanilla javascript parallax library
https://dixonandmoe.com/rellax/
MIT License
7.04k stars 880 forks source link

Blazor incompatibility? #233

Closed ThirteenBadIdeas closed 3 years ago

ThirteenBadIdeas commented 3 years ago

Anyone have an idea to get this working in a Blazor Server application?

It simply doesn't work, and I'm not seeing any console error messages. When I remark out the inclusion of "blazor.server.js" it starts working. Obvisouly that's not a workable solution. I've tried including Rellax both above and below the Blazor library, but haven't started digging into the two libraries to see what might be conflicting.

ThirteenBadIdeas commented 3 years ago

On further investigation, it seems rellax does load when the page loads, but then gets detached somehow. If I call Rellax() on a button click event to load it again, it begins to work fine. Seems like a Blazor or general SPA issue I need to work around, not Rellax. Sorry to bother.