Opened 10 years ago

Closed 10 years ago

#8840 closed bug (notabug)

JQuery UI opens multiple dialogs when facing an XML header

Reported by: urskr Owned by:
Priority: minor Milestone: 1.10.0
Component: ui.dialog Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:


Using JavaScript's XMLSerializer, I convert some XML to HTML. In Firefox, the resultant HTML is prefaced with XML metadata: When I hand this into jquery's dialog function, multiple dialogs open. The code behaves as expected in Chrome, since the XMLSerializer doesn't add the XML metadata.

var content = new XMLSerializer().serializeToString(result); <?xml version="1.0" encoding="UTF-8"?><myXML></myXML> $(content).dialog();

Change History (2)

comment:1 Changed 10 years ago by urskr

As a workaround, I can remove the XML header:

var content = new XMLSerializer().serializeToString(result); var cleanContent = content.replace(/<\?.*\?>/, "");

Version 0, edited 10 years ago by urskr (next)

comment:2 Changed 10 years ago by Scott González

Resolution: notabug
Status: newclosed

This is correct. If you call dialog on two nodes, you'll get two dialogs.

Note: See TracTickets for help on using tickets.