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

Bug 376960

Summary: Text selection can run out of sync between client and server after key event processing
Product: [RT] RAP Reporter: Arnaud MERGEY <a_mergey>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 1.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Application reproducing the issue
none
RWT patch none

Description Arnaud MERGEY CLA 2012-04-17 08:24:41 EDT
Following http://www.eclipse.org/forums/index.php/t/330736/
If a KeyListener is attached to a Text widget, and the text is updated during a key event is fired, Text selection on server side, is not in sync anymore with client selection position.

The attached application show a reproducible case:

 put the caret somewhere in the Text widget (in view) and press key PageUp, the text is updated and the caret position go to the end, but it should remains to current char according to code.
 
It seems the reason for that is selection is not preserved when keyEvent is processed, as updating RWT with attached patch solve the issue (I know my patch is not a fix for this issue, but maybe it can help to understand it)
Comment 1 Arnaud MERGEY CLA 2012-04-17 08:25:35 EDT
Created attachment 214097 [details]
Application reproducing the issue
Comment 2 Arnaud MERGEY CLA 2012-04-17 08:26:20 EDT
Created attachment 214098 [details]
RWT patch
Comment 3 Ivan Furnadjiev CLA 2012-04-17 12:29:21 EDT
.

*** This bug has been marked as a duplicate of bug 376957 ***