- This topic has 35 replies, 5 voices, and was last updated 4 years, 1 month ago by Suraj Katwal.
-
AuthorPosts
-
January 31, 2020 at 2:40 pm #1150878Fernando
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.
January 31, 2020 at 6:06 pm #1150956TomLead DeveloperLead DeveloperHi there,
We’re using
window.scrollTo
in our javascript. Did they offer any insight as to why this would be conflicting with their javascript?February 3, 2020 at 5:35 pm #1153502AbdelhakimI 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.
February 3, 2020 at 5:37 pm #1153504AbdelhakimHey, Fernando. Did you fix the issue? If yes, what you did exactly.
Thank you.
February 3, 2020 at 5:49 pm #1153506TomLead DeveloperLead DeveloperAh, 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.
February 3, 2020 at 5:52 pm #1153509AbdelhakimHey 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.
February 3, 2020 at 5:56 pm #1153511LeoStaffCustomer SupportWe 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 🙂
February 3, 2020 at 6:00 pm #1153513AbdelhakimHey, 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.
February 3, 2020 at 7:34 pm #1153553LeoStaffCustomer SupportSounds good.
Let us know what they say.
February 4, 2020 at 4:23 am #1153886AbdelhakimHey, 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.
February 4, 2020 at 8:16 am #1154358TomLead DeveloperLead DeveloperThat 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.
February 4, 2020 at 8:41 am #1154402AbdelhakimThis is really annoying, I only want the problem to get fixed that’s it! Is it hard to do so!
February 4, 2020 at 8:44 am #1154410TomLead DeveloperLead DeveloperI 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/
February 4, 2020 at 10:09 am #1154469AbdelhakimHello, 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.
February 4, 2020 at 10:12 am #1154471AbdelhakimWell, after watching the video and talking with some developers, I am pretty sure that the issue comes from your side.
-
AuthorPosts
- You must be logged in to reply to this topic.