Reviewed & tested by the community
Project:
Modal forms (with ctools)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Jan 2013 at 16:20 UTC
Updated:
6 Nov 2018 at 22:45 UTC
Jump to comment: Most recent
Comments
Comment #1
aritra.ghosh commentedThough I admit this may be a bit hackish, but i achieved the close on click outside the modal with this piece of js code:
$('#modalBackdrop').click(function() {
$('.popups-close').trigger('click');
});
Hope this helps!!
Comment #2
sincronista commentedI have tried to add this function to my site without any luck.
I added your piece of code to my modal_forms_login.js file (because I am using the module only for my login window).
Could you give more details on where to add the code?
Thanks!
Comment #3
caiosba commentedYou can do the following too:
Or add the line below to ctools/js/modal.js (around line 430):
Comment #4
chrinor2002 commentedAdd the following to any of your JS documents (such as one that is included for your theme):
Comment #5
cosolom commentedchrinor2002, thank you for elegant solution
Comment #6
hamrant commentedchrinor2002, thank you
Comment #7
firewaller commented#4 works great for me! Would love to see this added as an optional setting in the module.
Comment #8
firewaller commented