Although this is a old post, I have spent 3 hours to fix my issue and I think this might help someone in future.
Here is my jquery-dialog hack to show html content inside an :
let modalProperties = {autoOpen: true, width: 900, height: 600, modal: true, title: 'Modal Title'};
let modalHtmlContent = 'My Content First divMy Content Second div';
// create wrapper iframe
let wrapperIframe = $('');
// create jquery dialog by a 'div' with 'iframe' appended
$("").append(wrapperIframe).dialog(modalProperties);
// insert html content to iframe 'body'
let wrapperIframeDocument = wrapperIframe[0].contentDocument;
let wrapperIframeBody = $('body', wrapperIframeDocument);
wrapperIframeBody.html(modalHtmlContent);
jsfiddle demo