Project: SWT
Bug 154036 [Browser] Cannot Edit a Html IFrame which is in swt
Reported: 2006-08-16 06:43:10 | Status: resolved fixed

I created a SWT class to have a browser.I have set the text of the browser to html.The html has a link to a html page .This html page has a IFrame with design mode on . But I cannot edit this Iframe when I run the SWT.In normal html page the Iframe is editable. The code of swt class and html page is as shown below : import org.eclipse.swt.*; import org.eclipse.swt.browser.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class Snippet1 { public static void main(String [] args) { /* Relative links: use the HTML base tag */ String html = "<html><head>"+ "<base href=\"E:/dev/SWT-TEXTAREA/VEDEMO/\">" + "<title>HTML Test</title></head>"+ "<body><a href=\"newwel.html\">local link</a></body></html>"; Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new FillLayout()); Browser browser = new Browser(shell, SWT.NONE); browser.setText(html); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } } ------------------------------------------------------------------------------ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>IFrame Design Mode</title> </head> <body> IFrame with Design Mode on. <br> <iframe id="rtEditor" name="rtEditor" width="100%" height="120px"> </iframe> </body> <script type="text/javascript"> rtEditor.document.designMode = "on"; </script> </html>

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java