Community
Participate
Working Groups
Build ID: 1.2 Steps To Reproduce: 1. Create a Text control 2. Set some text in the control 3. Call selectAll() on the Text control More information: The rendered Text control does not have the text selected. Selecting the text programatically after the Text control is displayed (i.e. on a Button push) does not work either.
Debugging through TextLCA, I can see the selection being written in renderChanges, so I'm guessing this is a client side bug.
I can't reproduce it with FF 3.5.2, IE8, Chrome on Windows Vista with Controls Demo -> Text Tab, CVS HEAD. There are other bugs Bug 236577 and Bug 243876 related to the text selection that you can run on them.
It seems this is a bit more random than I thought... Selection works on: * OS X - Chrome 3.0.198.1 (pre release) * OS X - Safari 3.0.4 Selection does not work on: * OS X - Firefox 3.0 * OS X - Firefox 3.5.2 * OS X - Safari 4.0.3 * Windows XP - Firefox 3.1 b2 * Windows XP - IE 8 I'm testing with a basic Shell with a single control in it, so there shouldn't be any undue interactions.
Hi Tom, with fixing the Bug 236577 this isuue should be fixed too. Please note that a call to text.setFocus() is needed to visualize the selection (see snippet on bug 236577). Please confirm that the issue is fixed on OS X.
This still isn't working in CVS HEAD. I've tested with IE 7 + 8 on XP, FF 3.5.3 on OS X, XP and Linux, FF 3.0.10 and 3.0.14 on OS X, Safari 3.0.4 and 4.0.3 on OS X and Chrome 4.0.207 on OS X. As before, only Safari 3.0.4 and Chrome 4.0.207 work as expected. In our case the selection failing is in org.eclipse.jface.dialogs.InputDialog, which does indeed execute setFocus() and selectAll(). Adding a selectAll() and setFocus() to the test snippet in Bug 236577 also fails to work (the text selection from the button press works, but not on load).
On load selection is fixed in CVS HEAD too. Please reopen if the bug persist.
Tested on all the browsers listed previously, and works on all of them. Thanks for the fix!