[Resolved] Problem with smooth-scroll and LuckyWP plugin

Home Forums Support [Resolved] Problem with smooth-scroll and LuckyWP plugin

Home Forums Support Problem with smooth-scroll and LuckyWP plugin

Viewing 15 posts - 1 through 15 (of 36 total)
  • Author
    Posts
  • #1150878
    Fernando

    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.

    #1150956
    Tom
    Lead Developer
    Lead Developer

    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?

    #1153502
    Abdelhakim

    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

    #1153504
    Abdelhakim

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

    Thank you.

    #1153506
    Tom
    Lead Developer
    Lead Developer

    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.

    #1153509
    Abdelhakim

    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.

    #1153511
    Leo
    Staff
    Customer Support

    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 🙂

    #1153513
    Abdelhakim

    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.

    #1153553
    Leo
    Staff
    Customer Support

    Sounds good.

    Let us know what they say.

    #1153886
    Abdelhakim

    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.

    #1154358
    Tom
    Lead Developer
    Lead Developer

    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.

    #1154402
    Abdelhakim

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

    #1154410
    Tom
    Lead Developer
    Lead Developer

    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/

    #1154469
    Abdelhakim

    Hello, Tom. The developer of LuckyWP replayed to me with this
    Check out the video, please.

    LuckyWP (@theluckywp)
    10 minutes ago
    Hello!

    I created video: https://www.youtube.com/watch?v=NVs-Xi2ZrrU
    I hope this will help GP developers understand their mistake.

    They overrided internal function window.scroll: https://developer.mozilla.org/en-US/docs/Web/API/Window/scroll.

    #1154471
    Abdelhakim

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

Viewing 15 posts - 1 through 15 (of 36 total)
  • You must be logged in to reply to this topic.