Skip to main content

Search and Top Navigation

#8453 closed bug (notabug)

Opened July 21, 2012 01:18AM UTC

Closed August 04, 2012 08:34AM UTC

opening jqueryui dialog messes up content in iframe within dialog

Reported by: jslaybaugh Owned by: jslaybaugh
Priority: minor Milestone: 1.9.0
Component: ui.dialog Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:

I'm using wysihtml5 for rich text editing and it works great, except in my jquery ui dialogs. When that happens, for some reason, jqueryUI seems to be stripping out the <link rel="" type="" href=""> tags from the head of the iframe that wysihtml5 creates on the fly. To make it work, on dialog:open, I end up having to do something like this:

var iframedoc = $("iframe").get(0).contentDocument;

$(iframedoc).find("head").html("<link rel='stylesheet' type='text/css' href='/Content/css/wysihtml5-content.css'>");

So that I can add the appropriate styles back in. I tried stepping through the code to see if I saw anything specific where it was stripping this content specifically (because it leaves most of the other inline <style></style> content as well as all the body html, but it just removes a <meta> tag and any <link> tags from the head.

I tried to also create a jsfiddle but it seems jqueryui dialog doesnt work in jsfiddle anyway.

I'm using jquery 1.7.1, jqueryui 1.8.16, and wysihtml5 0.3.0 rc2.

Thanks - Jorin

Attachments (0)
Change History (2)

Changed July 21, 2012 01:58AM UTC by scottgonzalez comment:1

owner: → jslaybaugh
status: newpending

Dialogs definitely work in jsFiddle:

Please provide a reduced test case. It seems very unlikely that the dialog is doing this.

Changed August 04, 2012 08:34AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!