Archived topic
Mobile Slideout Menu deep link
10 replies · Started by Peter on March 24, 2018
Hi,
Im having trouble with deep links from the mobile slideout menu
same page deep link from punycode.io to punycode.io/#about
--> Mobile slideout menu doesnt close down after click.
cross site deep link from punycode.io/api/ to punycode.io/#about
--> Link doesnt work and mobile slideout menu doesnt close down menu after click.
Tested on latest stable chrome for samsung s7 & windows desktop in mobile view
Instead of using your own smooth scroll, can you enable the GP smooth scroll in "Customize > General"?
Then give the menu item the class: smooth-scroll
Let me know if that fixes it.
Hi,
with smooth-scroll the link doesnt work at all on both pages.
Any other custom javascript on the page? Can you try deactivating your other plugins/code snippets to rule out conflicts?
I deactivated all custom code as well as all plugins. The only culprit I can find is GP Premium Mobile Plus, which I guess builds the menu in the first place.
GP Premium Mobile Plus enabled + everything else disabled = link doesnt work.
Evertything disabled = link works.
Looks like a bug with our new smooth scroll script and anchors on another page.
I'll get this figured out for 1.6.1.
Thanks!
I fixed it for deep linking to other pages with
if (this.pathname === location.pathname) {
...
Where did you add that?
GPP 1.6.1 has been released and should fix this.
Let me know :)
Beautiful. Works differently on first use (where it seems to reload the page) and on consecutive uses (where is smooth-scrolls and then closes the slideout menu. Second is perfect. First is minor annoyance :)
you can see it here on the about link in the mobile slideout https://punycode.io/
Thanks!
When linking to an anchor on a separate page, it's really hacky to implement smooth scroll. That's because the browser automatically takes you to the anchor point.
So for the JS to work, it would need to take you back to the top, then scroll back down again, which would cause an annoying flash.