I'm using modalframe and automodal (which automatically creates modalframes from a css class on a link).
My request is more related to modalframes I believe.
I would like to close the modalframe, by just clicking on the area around the modalframe (in other words, by clicking on any spot outside the modalframe).

I googled "jquery and close dialogs" and found this piece of code:

$('.ui-widget-overlay').live('click', function() {
$(".dialogClass").dialog( "close" );
});

I tried to add this to ui.dialogs.js which didn't work, unfortunately.
How could I close modalframes by clicking outside them?

Comments

dsnopek’s picture

Issue summary: View changes
Status: Active » Fixed

Rather than calling $(".dialogClass").dialog( "close" ); call Drupal.modalFrame.close(). I hope that helps!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.