inline box creating nested divs

6,029 views
Skip to first unread message

David Edgar

unread,
Apr 1, 2011, 1:57:30 PM4/1/11
to fancybox
I repeatedly clicked and closed "Inline - modal window" on the
examples on the home page.

Viewing the content in Firebug (on Firefox) or the IE8 Developer tools
source viewer, I see the following HTML content:

<div style="width: auto; height: auto; overflow: auto; position:
relative;">
<div style="width: auto; height: auto; overflow: auto; position:
relative;">
<div style="width: auto; height: auto; overflow: auto; position:
relative;">
<div style="width: auto; height: auto; overflow: auto; position:
relative;">
<div style="width: auto; height: auto; overflow: auto;
position: relative;">
<div style="width: auto; height: auto; overflow: auto;
position: relative;">
<div id="inline2">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing
elit. &nbsp;&nbsp; <a onclick="$.fancybox.close();"
href="javascript:;">Close</a>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

Another new nested 'div' is created each time the box is opened. This
doesn't look the correct behaviour. How can it be fixed?

JFK

unread,
Apr 1, 2011, 6:08:40 PM4/1/11
to fancybox
it seems to me that it's a BUG
the best to do is to report it here
http://code.google.com/p/fancybox/issues/list

as a workaround, you may want to add this to your custom script:

'onCleanup': function() {
var myContent = this.href;
$(myContent).unwrap();
}

I guess it should be used for inline or ajax content only

David Edgar

unread,
Apr 4, 2011, 4:49:06 AM4/4/11
to fancybox
Ah, thank you, that fix stops it happening.

It looks like the same issue has already been reported as Issue 95, in
fact ( http://code.google.com/p/fancybox/issues/detail?id=95 ), so I
didn't add a new report.



On Apr 2, 12:08 am, JFK <jfk.d...@gmail.com> wrote:
> it seems to me that it's a BUG
> the best to do is to report it herehttp://code.google.com/p/fancybox/issues/list
Message has been deleted

Bytor99999

unread,
Jun 20, 2012, 10:48:49 PM6/20/12
to fanc...@googlegroups.com
This workaround no longer works. At least in the version I am currently using 2.0.6

I have updated the issue 95 with a new workaround. The link is below

Mark

JFK

unread,
Jun 28, 2012, 5:57:21 PM6/28/12
to FancyBox
@Bytor99999

I am not aware that this bug exists in v2.x so the "workaround" is
redundant
> > fact (http://code.google.com/p/fancybox/issues/detail?id=95), so I

Bytor99999

unread,
Jul 18, 2012, 10:33:54 PM7/18/12
to fanc...@googlegroups.com
Yes, it definitely still occurs in the latest in the Github repo. So that issue has an image of what it looks like and that is what happens with me. And only my workaround gets rid of that left over remanant tag.

Mark

JFK

unread,
Jul 30, 2012, 6:25:57 PM7/30/12
to fanc...@googlegroups.com
seeing it is believing it
show a sample of the issue ... because (I insist) it doesn't happen with fancybox v2.x (unless you prove me wrong)
Reply all
Reply to author
Forward
0 new messages