Link for pop-up causes browser to scroll to top of page

I’m using a plugin called My Calendar. When I click on an event on a calendar a pop-up opens with more details for that event. But, after clicking the event the page scrolls to the top. I am trying to figure out how to not have the browser move up on the page.

Here is one of my calendars:

The event links start with a “#” so I tried adding a simple link below the calendar with just a “#” to see if it would cause the same behavior, it does not.

And if I disable X Theme and activate WP 2022 basic theme, the event click pops up and doesn’t scroll to the top of the page.

Thanks for your help.

Hi @danwedin,

Thanks for reaching out.
It seems that it might be the conflict with the 3rd Party shortcode which shows the Event Calendar. As it is an issue with the 3rd Party plugin and we don’t have much control over the code, I would suggest you contact the Plugin Author on this.

Thanks

Hi there, I did contact the Plugin Author and he said they haven’t seen this issue in any other environments, they suggested I disable all plugins and themes to find out which one is affecting it. And X Theme was the only one I found to cause the issue.

I disabled the pop-up function for now, so clicking on an event takes you to the individual event’s page. If anyone has an idea on how to fix the scrolling when the pop-up is enabled please let me know and I’ll enable it back for testing.

Hi @danwedin,

This is a 3rd Party shortcode issue, and we don’t have any control over the code. Still, we are curious to know what is the reason behind the problem. I would suggest you please provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Please note that we do not guarantee a fix or compatibility for custom codes.

Thanks

Hi @danwedin,

Unfortunately, the given credentials are not working. Can you please check and send it once again?

Thanks

That’s odd because I just used those creds to login.

Hi @danwedin,

I have already cleared the browser cache and used the Incognito window of the browser but the credential does not work. I would suggest you check and let us know once it is accessible.

Thanks

Ok I’ll create a new user for you.

Hey @danwedin,

In our themes, we have a smooth scrolling script for jump links that is why links with # scroll to their respective destinations. The calendar plugin should change their system to not use or eliminate the use of # in the button or link.

The reason why it works in other themes is that other themes don’t have the feature to smooth scroll jump links.

So the compromise for this case really is that you disable the popup function to go to the individual page.

Thank you for understanding.

Is there javascript to turn off the feature to smooth scroll jump links?

Hey @danwedin,

Regretfully, no. And, there’s no workaround.

But I didn’t install the Smooth Scrolling plugin. So why would smooth scrolling be turned on?

Hello @danwedin,

The Smooth Scrolling Script that @Christian talked about is already integrated in the theme which is why there is no workaround for the Calendar Plugin links to make it work.

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.