Site logo

Archived topic

Problem with smooth-scroll and LuckyWP plugin

35 replies · Started by Fernando on January 31, 2020

Viewing posts 1–15 of 36

Hello!

There is a problem when we use smooth scroll in GP Premium and the plugin Lucky WP table of contents: links in this table dont work.

The javascript console shows this error: Uncaught TypeError: window.scroll is not a function

As LuckyWP says, error is in the GP plugin:

Problem in plugin GP Premium. Script https://www.luca.eu/wp-content/plugins/gp-premium/general/js/smooth-scroll.js overrided internal function window.scroll (https://developer.mozilla.org/en-US/docs/Web/API/Window/scroll). This results in an error.

-----
Question is: How do we solve this?

Thank you.

Hi there,

We're using window.scrollTo in our javascript. Did they offer any insight as to why this would be conflicting with their javascript?

I have the same issue since last week, this is really frustrating. Could you please take a look and fix this Tom? They said the issue comes from GP premium

Take a look at what they said.

Image 1

Image 2

Image 3

Hey, Fernando. Did you fix the issue? If yes, what you did exactly.

Thank you.

Ah, so it's a conflict with this library, which we're using: https://github.com/cferdinandi/smooth-scroll

The script is very popular (almost 5k stars) - if it's a conflict with LuckyWP specifically, they may want to want an issue with the author.

Hey Tom, thank you for your quick replay, I don't totally get what you are talking about...To be honest with you I am not a technical guy, I just want the problem to be solved.

We can't really fix that on our end as we are also using a third party script.

If you show Tom's reply to the support of LuckyWP, they should understand it :)

Hey, Leo. Thank you for the replay, This is exactly what I just did in the past 2 minutes, hopefully, they will understand and fix this issue because it is really annoying.

Sounds good.

Let us know what they say.

Hey, leo & Tom I had a disscution with the developper of Luckywp, this is what he told me :

Problem not in originl Smooth Scroll script. See this: https://github.com/cferdinandi/smooth-scroll/blob/master/dist/smooth-scroll.js

There is no “/* GP */ var scroll = new SmoothScroll( …` in this code.

This code added GP developers to this file: https://www.luca.eu/wp-content/plugins/gp-premium/general/js/smooth-scroll.js (see end of file). The problem is in the code that the GP developers added.

That line is how you initiate the smooth scroll library.

If there's something specific in that block of code causing a conflict, we would need more information. All it's doing is initializing the smooth scroll library and sorting out the necessary offset for sticky navigations.

This is really annoying, I only want the problem to get fixed that's it! Is it hard to do so!

I understand, but I'm not seeing what the conflict is, which makes it impossible to fix.

Our smooth scroll feature is 100% optional, so you can turn it off if it's conflicting on your website. There are other options available: https://wordpress.org/plugins/jquery-smooth-scroll/

Well, after watching the video and talking with some developers, I am pretty sure that the issue comes from your side.

This archived topic is closed to new replies.