Bug 393217 - Characters get lost when using a VerifyListener to modify the text
Summary: Characters get lost when using a VerifyListener to modify the text
Status: ASSIGNED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-31 04:52 EDT by Claudio Guglielmo CLA
Modified: 2013-06-24 11:34 EDT (History)
0 users

See Also:


Attachments
Example to reproduce the bug (1.16 KB, application/octet-stream)
2012-10-31 04:52 EDT, Claudio Guglielmo CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Claudio Guglielmo CLA 2012-10-31 04:52:46 EDT
Created attachment 223027 [details]
Example to reproduce the bug

I have a text component with an attached verify listener which modifies the text.

On slow networks, if I type text with a high speed, some letters will disappear.

You can reproduce it with the attached example. To throttle the network speed I used Charles (www.charlesproxy.com) and set the bandwidth to 384Kbit/s (EDGE). The example converts the text to uppercase.

Btw: I know the clientscripting incubator project and will have a look at it. To just convert letters to uppercase it's definitely more suitable to do this on client side. But I'm sure there are other examples which can't solved by clientscripting, so I think it should be fixed anyway.
Comment 1 Claudio Guglielmo CLA 2012-10-31 05:11:05 EDT
An idea to fix the bug could be to prevent setting a value while a request is scheduled which potentially modifies the text. 

Text.js:
acceptSelectionChange : function() {
  return !this._requestScheduled;
},

acceptValueChange : function( event ) {
  return !this._requestScheduled;
},

If I use these checks in TextAdapter.js and BasicText.js it seems to work but I cannot tell other implications. It's just a rough idea.