Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369045

Summary: [Text] Selection set with delay
Product: [RT] RAP Reporter: Tim Buschtoens <tbuschto>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tbuschto
Version: 1.5   
Target Milestone: 1.5 M5   
Hardware: All   
OS: All   
Whiteboard:

Description Tim Buschtoens CLA 2012-01-19 04:24:16 EST
Programatically setting a selection on Text delays for 50ms (TextUtil.js). While not much, it can could happen that a keypress cached by the browser gets executed before it's applied, which is then messing up selection and text content.
Comment 1 Tim Buschtoens CLA 2012-01-19 06:49:36 EST
Fixed CVS HEAD. Selection is set on appear.
Comment 2 Ivan Furnadjiev CLA 2012-01-29 04:30:51 EST
With this change the initial setting of selection does not work anymore in IE, Chrome and Safari. Reproducible with Controls Demo -> Text tab. Open the text tab in one of these browsers -> text is not selected. Works fine in Firefox and Opera.
Comment 3 Tim Buschtoens CLA 2012-01-30 08:59:57 EST
Also fixed.

For webkit, the problem seems to be when setting the same selection values twice. For IE, the issue was that setting the selection length on any text, even if it has length zero, resets all other selections to 0. Fixed in TextField.js and TextUtil.js