Community
Participate
Working Groups
I have noticed that if focus is in a Browser and then moved to a Text (or Spinner, for that matter, and possibly other SWT components as well), the caret of the Text (Spinner, etc.) will become invisible (focus is successfully moved, no problems there). I have put up a small application to illustrate the bug (code below). Run it and try to (1) move the focus to any of the Text's when the Browser has focus (this will make the caret disappear) and (2) move the focus from one Text to the other (this will make the caret appear as expected). import org.eclipse.jface.window.ApplicationWindow; import org.eclipse.swt.SWT; import org.eclipse.swt.browser.Browser; import org.eclipse.swt.layout.RowData; import org.eclipse.swt.layout.RowLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Text; public class Playground extends ApplicationWindow { public Playground() { super(null); } @Override protected Control createContents(Composite parent) { getShell().setText("Bug report application"); getShell().setSize(700, 500); Composite comp = new Composite(parent, SWT.NONE); RowLayout rowLayout = new RowLayout(SWT.VERTICAL); rowLayout.wrap = false; comp.setLayout(rowLayout); Text location = new Text(comp, SWT.BORDER); location.setText("http://www.google.com/"); RowData textData = new RowData(640, 15); location.setLayoutData(textData); Browser browser = new Browser(comp, SWT.BORDER); browser.setUrl("http://www.google.com/"); RowData browserData = new RowData(650, 350); browser.setLayoutData(browserData); Text location2 = new Text(comp, SWT.BORDER); location2.setText("http://www.google.com/"); textData = new RowData(640, 15); location2.setLayoutData(textData); return comp; } public static void main(String[] args) { Playground app = new Playground(); app.setBlockOnOpen(true); app.open(); Display.getCurrent().dispose(); } }
*** This bug has been marked as a duplicate of bug 181410 ***