Opened 8 years ago

Closed 8 years ago

#8453 closed bug (notabug)

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:

Description

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 = $(event.target).find("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

Change History (2)

comment:1 Changed 8 years ago by Scott González

Owner: set to jslaybaugh
Status: newpending

Dialogs definitely work in jsFiddle: http://jsfiddle.net/He5fk/

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

comment:2 Changed 8 years ago by trac-o-bot

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!

Note: See TracTickets for help on using tickets.