Topic-icon Modal close does not work

3 years 5 months ago #66871 by chramb1
For some reason, the modal close button (the small X in the upper-right of the modal login) doesn't do anything. Clicking slightly below it closes the modal, but, of course, that's not something one expects.

You can see this on one of my sites: www.thechipwitch.com - the text link to bring up the modal is in the upper right.

Might I have configured something wrong?
The topic has been locked.
3 years 5 months ago #66872 by chramb1
Replied by chramb1 on topic Modal close does not work
Problem found -

The main component has an option to load or not load jQuery JS. It says to not load it if another component loads it. Of course, I have other components loading jQuery, so I disabled this.

But in looking, you don't load jQuery in a pristine state. You ship with a customized version that has the code in it needed for SCLogin to properly center itself and have the modal close button work. It uses "jfbcJQuery" to access the library, in fact. Specifically, <script src="/media/sourcecoast/js/jq-bootstrap-1.8.3.js"></script> is injected. Without it, SCLogin won't work right.

Which means I'm tied to loading your big jQuery, even though I'm not only loading it myself, but am on jQuery v1.12.4.

What to do?
The topic has been locked.
Support Specialist
3 years 5 months ago #66875 by alzander
Replied by alzander on topic Modal close does not work
The issue likely isn't just jQuery, we also require Bootstrap's javascript. Unfortunately, template developers, extension developers and any other piece of code that can get your site can include their own versions of each of those files. Our "Include jQuery / Bootstrap" option does include a namespaced version of those files. The benefit is that there is no way the can conflict with the other jQuery's and Bootstraps on your site and no other versions can conflict with ours. But, you're correct, it's an extra inclusion of a file that even we'd like to not have to include.

Unfortunately, there's not a way to fix this reliably other than to include ours. The jQuery and Bootstrap versions we are compatible with are the ones that ship with Joomla. If those versions are being used by other extensions or they are loading Joomla's versions, then you shouldn't need our "Include jQuery / Bootstrap" setting. If you're site is loading newer versions, which have incompatibilities with the older versions (like you mention), you'll need to load our compatibility layer.

Joomla 4 brings jQuery up to date and decouples things better. We're very excited about the opportunities there.

I hope that helps explain,
Alex
The topic has been locked.
Support Specialist
3 years 5 months ago #66876 by alzander
Replied by alzander on topic Modal close does not work
Actually.. I just looked at your site and it is loading the default jquery/bootstrap. Can you disable our inclusion and we'll look and see what we can find.

Thanks,
Alex
The topic has been locked.