Search
Other Modals questions
Forum

Joomla 4 Modals 12.6.1 Scrolling to the top after opening modal

Gerald Schroeder's Avatar Gerald Schroeder
So, after upgrading to joomla 4.3.4 and using Modals 12.6.1 whenever I open a modal it scrolls the page back to the top in the background. This is unwanted behavior. I want the background behind the modal to stay in the same position. How do I prevent the page behind the modal from scrolling back to the top?

I am using the Uber template from joomlart as well.
Peter van Westen's Avatar Peter van Westen ADMIN
This is probably caused by some scrolling script your template loads. It isn't something Modals does itself.
Please post a rating at the Joomla! Extensions Directory
Gerald Schroeder's Avatar Gerald Schroeder
How would I go about fixing this? This was not an issue on Joomla 3.x, but after upgrading now it is. I heavily use this extension so I need a fix for this. I have also tried disabling the external javascript from my template and that still doesn't seem to make any difference.
Peter van Westen's Avatar Peter van Westen ADMIN
See if you can disable the scrolling in the template settings. If so, see if that solves the issue.
Please post a rating at the Joomla! Extensions Directory
Gerald Schroeder's Avatar Gerald Schroeder
There is no ability to actually disable the scrolling function in the Uber template. So, I just tried disabling different scripts 1 by 1 and nothing seemed to work. I have spent several hours trying to figure out what it is with no luck.
Peter van Westen's Avatar Peter van Westen ADMIN
Well, I don't think it is something caused by Modals itself. So I don't think I can help you much with this.
But do you have this online so I can take a look?
Please post a rating at the Joomla! Extensions Directory
Gerald Schroeder's Avatar Gerald Schroeder
Is there a place I can post the link privately to you? This is on a development server. I will also probably need an IP address to whitelist you because of where you are located.
Peter van Westen's Avatar Peter van Westen ADMIN
You can use the 'Confidential information' button in the forum editor to hide sensitive information.
Please post a rating at the Joomla! Extensions Directory
Gerald Schroeder's Avatar Gerald Schroeder
Click on any of the videos on the following page under men's testimonials. The code is triggered inline in the php by a custom modal class called "modal-encompass". I have tried disabling all js files that I can find and inline js and it doesnt seem to fix it. Which tells me it might be in the new version of the modals extension interferes with the t3 framework itself at Joomlart. I have the modal extension in like 100 layout overrides though so I have to figure out a solution for this.
Confidential information:
(hidden)
Gerald Schroeder's Avatar Gerald Schroeder
It appears I was able to fix the issue by adding the following css code. I ran across this solution on stack overflow. The .rl-modal-open class gets added to the HTML tag/class. This didnt happen on the Joomla 3.x version of modals. I still dont know why I have to add this code to fix it, but it does fix it.

.rl-modal-open{
overflow:initial;
}
Peter van Westen's Avatar Peter van Westen ADMIN
I can't visit your site, as it seems to be blocked for the region I am currently in.

But happy you found a solution.

I do think this is caused by your templates css, though.

The '.rl-modal-open' class is just added for custom styling purposes. Modals doesn't change or add any styling to the page when that class is added.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription