title: Javascript: designMode for iframe doesn't work with FF when in jQuery dialog
body: <p>here's the sample code (fully working - just copy to an empty html file and it will work):</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;&lt;/title&gt;
  &lt;link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/redmond/jquery-ui.css" type="text/css" media="screen" /&gt;
  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"&gt;&lt;/script&gt;
  &lt;script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" language="javascript"&gt;
      function Init()
      {
          var doc = document.getElementById("iView").contentWindow.document;
  
          doc.designMode = "On"
  
          doc.open()
          doc.write("&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body class='some-class'&gt;Some test text&lt;/body&gt;&lt;/html&gt;");
          doc.close();
      }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="dlgDiv" style="width:202px; height:72px; border: solid 1px grey"&gt;
      &lt;iframe id="iView" style="width: 200px; height:70px" frameborder="0"&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  
      var dlg = null;
      jQuery(document).ready(function() {
  
          Init();
  
          dlg = jQuery("#dlgDiv").dialog({
              autoOpen: false,
              bgiframe: true,
              modal: true,
              width: 400
          })
  
          dlg.dialog('open');
      })
  
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Now, when I run this in IE, I can edit contents of iframe; also using IE Developer Toolbar I can see that body of iframe preserves class "some-class" I specified.
  But, when running this in FF, iframe is not editable, and when inspecting its DOM with firebug, i see that iframe's body is empty and has no class. So looks like for FF dialog makes a shallow copy of the div instead of using the div itself (dlgDiv) for dialog, or something like that...</p>
  
  <p>Basically that means that NONE of javasript based rich text editors would work in a jQuery dialog in FF (and btw Google Chrome as well) - thats a big bad issue (I have tried two so far and that's how I started looking into this issue)!</p>
  
  <p>Any ideas/comments/suggestions on how I could approach this, are highly appreciated!</p>
  
  <p>Thank you,
  Andrey</p>