Community
Participate
Working Groups
Build Identifier: 1.4.0.20110504-1831 RAP Version : 1.4M7 the error message under IE7 is : Javascript error occurred: Could not find iframe which was loaded [B]! Reproducible: Always Steps to Reproduce: 1. make a new plugin based on the example RAP application with View 2. replace the ViewPart with the given code (siehe under) 3. start the application 4. click on the button ViewPart class import org.eclipse.jface.dialogs.Dialog; import org.eclipse.swt.SWT; import org.eclipse.swt.browser.Browser; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.part.ViewPart; public class View extends ViewPart { public static class BrowserDialog extends Dialog { public BrowserDialog(Shell parentShell) { super(parentShell); } @Override protected Control createDialogArea(Composite parent) { Browser browser = new Browser(parent, SWT.BORDER); browser.setLayoutData(new GridData(GridData.FILL_BOTH)); return browser; } } public static final String ID = "TestRAP14_dialog.view"; /** * This is a callback that will allow us to create the viewer and initialize it. */ public void createPartControl(Composite parent) { Button button = new Button(parent, SWT.PUSH); button.setText("show dialog"); button.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { super.widgetSelected(e); BrowserDialog rtd = new BrowserDialog(Display.getCurrent().getActiveShell()); rtd.open(); /* * Absturz unter IE7 nach dem Click auf der "OK" Schaltfläche. * Javascript error occurred: Could not find iframe which was loaded [B]! */ } }); } @Override public void setFocus() { } }
Serge, I think that this bug is a duplicate of bug 345082, which has been fixed in CVS HEAD and in the upcoming RC1. Could you confirm this?
OK... I can reproduce it with current CVS HEAD and IE9.
Created attachment 195837 [details] Proposed patch In some cases ( can't really detect what/when/why IE does that ) IE fires onload DOM event on iframe, which has already been removed from the DOM (with parentNode null). The fix is not to throw an error in this case.
Comment on attachment 195837 [details] Proposed patch Patch is good.
Applied patch to CVS HEAD and v14_Maintenance.
(In reply to comment #1) > Serge, I think that this bug is a duplicate of bug 345082, which has been fixed > in CVS HEAD and in the upcoming RC1. Could you confirm this? Yes I confirm. I'd check-out the nightly build 20110516 and now it works perfectly under IE7 and IE8. Thanks.