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

Bug 387099

Summary: [Text] Modify listener is not notified when content is cut (Ctrl+X) in IE9
Product: [RT] RAP Reporter: Otmar Caduff <otmar.caduff>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tbuschto
Version: 1.5   
Target Milestone: 2.0 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard: sr151
Attachments:
Description Flags
Eclipse project with sample application to reproduce the problem. none

Description Otmar Caduff CLA 2012-08-13 07:02:58 EDT
Created attachment 219800 [details]
Eclipse project with sample application to reproduce the problem.

In a textfield (org.eclipse.swt.widgets.Text), add some text, mark it, press CTRL+X (cut) -> text is removed. However, the server is not being informed that the field content changed before some other action takes place.
See the sample application attached:
While typing, the content of the text field is printed to sysout.
Marking and deleting the content of the text field or parts of it by pressing the delete or backspace key works as expected (new field content is printed to sysout), but when pressing CTRL+X, nothing is written to sysout before some other action takes place.

The problem only occurs on IE, not on Firefox or Chrome. IE9 was used.
Comment 1 Ivan Furnadjiev CLA 2012-08-13 07:51:12 EDT
Reproducible with Controls Demo -> Text tab.
Comment 2 Tim Buschtoens CLA 2012-08-21 06:10:49 EDT
IE9 does not fire an input event if text is changed with CTRL+X. IE8 is fine.
Comment 3 Tim Buschtoens CLA 2012-08-21 06:29:20 EDT
See also Bug 372193 - Text widget: Modify Event not fired for Backspace key in IE.

Same issue, but CTRL+X does not fire a keypress either, which this fix relies on.
Comment 4 Tim Buschtoens CLA 2012-08-22 06:37:57 EDT
Fixed with commit eb61a4aa129c71925bb2eee01ebf3d60b27b4995

Simply added keyup to the list of events that trigger modify-check.
Comment 5 Tim Buschtoens CLA 2012-08-22 06:38:46 EDT
Fix is very simple, i would consider it for SR.
Comment 6 Ralf Sternberg CLA 2012-09-05 11:28:25 EDT
(In reply to comment #5)
> Fix is very simple, i would consider it for SR.

+1
Comment 7 Ivan Furnadjiev CLA 2012-09-07 03:20:48 EDT
Backport the fix to 1.5 maintenance branch with commit 219066797c0bf8bbce0830c367155ff5ec9202b8.