- This topic has 16 replies, 4 voices, and was last updated 3 years, 11 months ago by Tom.
-
AuthorPosts
-
April 28, 2020 at 7:24 pm #1260502George
I have trouble making the smooth scroll work (I have obviously activated it). Using GenerateBlocks, I insert a GB button and set its class to
smooth-scroll
. I also set its link to#album
. Further down the page, I have a headline with an Element ID ofalbum
. While viewing the page and clicking on the button, the page jumps to the headline element but without smooth scroll.Inspecting the code of the button code:
<a class="gb-button gb-button-c18b5f49 smooth-scroll" href="#album"><span class="button-text">Play now</span></a>
and the headline
<h3 id="album" class="gb-headline gb-headline-b6413a82">You are your only limit</h3>
What is the problem?
April 29, 2020 at 2:57 am #1260847DavidStaffCustomer SupportHi there,
can you provide a link to a page where we can see the issue?
April 29, 2020 at 4:50 am #1260989MarcelInterested also.
April 29, 2020 at 9:56 am #1261597GeorgeI’ve updated the original thread with a link. The PLAY NOW button at the top has a class of
smooth-scroll
linking to#album
. The container underneath has an element ID ofalbum
.Also, using the latest GB beta 4.
April 29, 2020 at 5:11 pm #1262121TomLead DeveloperLead DeveloperSeems to be working for me in Chrome and Firefox. Did you get it fixed?
April 29, 2020 at 5:19 pm #1262130GeorgeNo, I didn’t touch. It doesn’t work for me! Tried in Firefox and Chrome. In Private and Incognito windows respectively with addons disabled! It jumps to the section without smooth scroll. No console errors either.
April 29, 2020 at 5:24 pm #1262143GeorgeIt works on my Android phone, though! And my old Ipad 2 on Safari. Also works on Edge! Not working in Opera.
April 29, 2020 at 5:32 pm #1262146GeorgeHmmm. Tom, I think we might have a recurrence of this!
https://generatepress.com/forums/topic/smooth-scroll-not-working-3/I am on a Win10 laptop, both browsers updated.
Could it be a case of this?
https://generatepress.com/forums/topic/smooth-scroll-how-to/And I need to use
generate_smooth_scroll_elements
or similar filter for the button instead?April 30, 2020 at 9:17 am #1263452TomLead DeveloperLead DeveloperIt shouldn’t be, as the class is added to the button directly.
Does this work for you?: https://codepen.io/cferdinandi/pen/wQzrdM
April 30, 2020 at 9:28 am #1263477GeorgeNo, exatly the same behavior. Works on Edge and Blisk browser on desktop and my Android phone.
Does not work on Firefox, Chrome, Opera on Desktop.
I am on Windows 10 on a laptop.
April 30, 2020 at 4:49 pm #1263946TomLead DeveloperLead DeveloperSo it seems there’s something up with your computer and the smooth scroll library we’re using: https://github.com/cferdinandi/smooth-scroll
Looks like they’ve just archived it in favor of using the new built-in CSS method.
Have you tried on another computer?
April 30, 2020 at 6:37 pm #1264080GeorgeNo access to another computer now, I will try tomorrow. But the CSS method worked but just for Firefox. It still doesn’t work on Chrome and Opera. I will let you know once I test on another computer tomorrow!
May 1, 2020 at 9:07 am #1265123TomLead DeveloperLead DeveloperSounds good, thanks!
May 2, 2020 at 7:07 am #1266087GeorgeYou wouldn’t believe what it was!
Known Issues: Reduced Motion Settings
https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motionI just had to activate the option on Windows 10: Settings > Ease of Access > Display > Show animations. It works everywhere now.
Thanks for the link, it helped!
May 2, 2020 at 9:05 am #1266401TomLead DeveloperLead DeveloperAwesome! Glad it’s working now 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.