-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default click anywhere else to close not working #14
Comments
Hi, it appears that jsfiddle suppresses events inside the results box but if you wrap it with a div, you can see the behavior working: HTH, Lee |
That makes sense. Thanks for looking at for me. |
I had this on the backburner when you responded, finally back to working on something with this again though. The containing works but is not ideal. Does my containing
have to span the entire page for a user to exit out of the modal, or am I doing something wrong?
That doesn't sound right by the looks of your examples page. |
that sounds very odd. Do you have a non js fiddle example that I could look at? The global close handler is attached to the |
Thanks for the quick reply :) Here is a simple example (using TBS 2.1.1 btw)
If I click anywhere within the top ~200px of the body it will close it (body { padding: 100px } ), but anywhere below and it doesn't want to work. |
Interesting, I wonder if the body isn't pushing all the way to the bottom of the browser page. You could try adding jquery body event to test this. Quick example: $(function() {
$('body').on('click', function(e) { alert("Body was clicked"); });
}); |
That looks to be the problem. Again if its below the ~200px it doesn't trigger the alert. Probably won't be too much of an issue in practice though. |
Hi, I think i have similar issue - when body is not as high, as viewport of browser, "click everywhere" is not really everywhere :) My suggestion is to bind event to document instead of body (line 75): $(document).on( this.attr.click_event_ns, function(e) { Then unbind on line 113: $(document).off( this.attr.click_event_ns ); |
I hate to bother you with what is probably a mistake on my part, but I can't figure out what's missing. The click over is functioning fine for the most part but the click anywhere else to close is not wanting to work here.
http://jsfiddle.net/nosfan1019/FBU7w/
The text was updated successfully, but these errors were encountered: