No modal window with outsideClickCloses

Page: 1

Author Post
Member
Registered: Dec 2010
Posts: 39
Location: Madrid, Spain
Byron,
Is there any way to have a no modal window (modal:false) with outsideClickCloses:true?
Thanks,
Administrator
Registered: Aug 2008
Posts: 3382
Hi,

No there isn't. That would be a contradiction. A non-modal box allows access to and interaction with the page underneath the Floatbox. The 'outside' clicks belong to and are handled by that page.

If you're just trying to make the shady page overlay go away, set overlayOpacity:0. It will still be there to receive the outside clicks, but won't be visible.
Member
Registered: Dec 2010
Posts: 39
Location: Madrid, Spain
The only problem with that is that the mouseovers will not work...
Administrator
Registered: Aug 2008
Posts: 3382
I don't really know exactly what you have in mind regarding page behaviour or the context that we're working in here, so probably shouldn't try to guess. However, if you want the underlying page be reachable while the floatbox is up, and make it the case that a user clicking on anything on that page closes the floatbox, this can be done by adding an event handler to the main page. Something like:

<script type="text/javascript">
fb.addEvent(document, &#039;mousedown&#039;, function(e) {
if (!fb.ownerInstance(e.target)) fb.end(true);
});
</script>

In general, the Floatbox API (and its callbacks) can be used to implement almost any behaviour.

Page: 1