You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

closeOnClick doesn"t work Created Nov 13, 2009

This thread is solved

Views: 3014     Replies: 12     Last reply Jan 17, 2011  
You must login first before you can use this feature

chovy

Posts: 13

Registered:
Nov 13, 2009

closeOnClick doesn"t work

Posted: Nov 13, 2009

by default it does not close when I click off the overlay...adding the param doesn't make it work either.

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» closeOnClick doesn"t work

Posted: Nov 13, 2009

Reply to: closeOnClick doesn"t work, from chovy
You are not very forthcoming with details ;-), but it could be related to this bug I just filed.

chovy

Posts: 13

Registered:
Nov 13, 2009

Here"s the URL

Posted: Nov 13, 2009

Reply to: » closeOnClick doesn"t work, from blacktrash
http://calq.us/

Even clicking far away doesn't close it.

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» Here"s the URL

Posted: Nov 13, 2009

Reply to: Here"s the URL, from chovy
It works for me when I click on the grey area around the centered white area (Firefox, Safari, Opera, IE6). But, as I said in my bug report, this worked far better in version 1.1.1 of jquery.tools.

wernerglinka

Posts: 11

Registered:
Nov 22, 2009

a work around

Posted: Nov 22, 2009

Reply to: » Here"s the URL, from blacktrash
I agree this should be considered a bug. I ran in to the same problem and came across this threat. I added a click handler to document that closes all overlays. Then I added a click handler to every overlay to stop event propagation, so the overlays are not closed when one clicks inside them. I hope this helps...

$(document).ready(function() {
$("img[rel]").overlay({
top:'40%',
onStart: function(event) {
event.stopImmediatePropagation();
}
});

$('.overlay').click(function(event) {
event.stopImmediatePropagation();
});

});

$(document).click(function() {
$("img[rel]").each(function() {
$(this).overlay().close();
});
});

chovy

Posts: 13

Registered:
Nov 13, 2009

» » Here"s the URL

Posted: Nov 22, 2009

Reply to: » Here"s the URL, from blacktrash
Its not working at all for me on mac 10.5.8 and FF 3.5.5 or Safari. It just stays open.

I'm giving wernerglinka's fix a try. I'd rather not down grade jquery-tools just to get this feature to work.

wernerglinka

Posts: 11

Registered:
Nov 22, 2009

» » » Here

Posted: Nov 22, 2009

Reply to: » » Here"s the URL, from chovy
Chovy,
I believe you have to click outside the body element to close the overlay. That is the reason why I added the click on thedocument handler which includes the entire window area. Let me know how it works for you.

btw,
I am developing on mac 10.5.8 but have tested this in virtual machines running window xp with ie7, ie8 and ff3.5. I also tested it on mac safari 3, 4 and ff 3.5/4

chovy

Posts: 13

Registered:
Nov 13, 2009

» » » » Here

Posted: Nov 22, 2009

Reply to: » » » Here, from wernerglinka
That explains it...I am using a new method where "body" element is what usually is done with a top-level "div".

I am seeing it work now that I click in the dark gray border area.

chovy

Posts: 13

Registered:
Nov 13, 2009

» » » » » Here

Posted: Nov 22, 2009

Reply to: » » » » Here, from chovy
You fix worked like a charm. Thanks

wernerglinka

Posts: 11

Registered:
Nov 22, 2009

» » » » » » Here

Posted: Nov 22, 2009

Reply to: » » » » » Here, from chovy
Alright,
It's fixed then. Let's hope the Tool guys will fix this in a later version.
I love this library. Has saved me a lot of time...
Werner

chovy

Posts: 13

Registered:
Nov 13, 2009

» » » » » » » Here

Posted: Nov 22, 2009

Reply to: » » » » » » Here, from wernerglinka
Yes, it has been nice not having to recreate the wheel everytime.

kahhoewan

Posts: 2

Registered:
Dec 10, 2010

» » » » » » » » Here

Posted: Dec 10, 2010

Reply to: » » » » » » » Here, from chovy
I have the same problem. and searched the entire forum and tried each solution they made with no luck.

wernerlinka i tried your work around. It still didn't work. the popup goes up and them disappears quickly without any click.

anyone else have any ideas?

MarcMorel

Posts: 1

Registered:
Jan 17, 2011

» » » » » » » » » Here

Posted: Jan 17, 2011

Reply to: » » » » » » » » Here, from kahhoewan
Kahhoewan,

the "onStart" event in wernerlinka workaround never fires. you may replace it with onBeforeLoad and it works fine :
    $("img[rel]").overlay(
            {
                onBeforeLoad: function(event) {
                    event.stopImmediatePropagation();
                }}
      );
hope it helps

Marc