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

Bug 368205

Summary: Text widget with SWT.MULTI style: Both return key and return key + shift, produce TraversalEvent with doit field set to false.
Product: [Eclipse Project] Platform Reporter: Jan Opacki <jan.opacki>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 3.7.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard: stalebug

Description Jan Opacki CLA 2012-01-09 18:35:44 EST
Hi,

Currently, when we create a multi-lined Text widget (with a SWT.MULTI style) and press enter or enter + shift, the TraversalEvent (SWT.TRAVERSE_RETURN) is produced but for both cases the doit value is set to false. In my opinion the more desirable behavior would be if doit value is set to true when user presses shift + enter, and false when user presses enter (which is indeed the behavior of a StyledText widget).

---

Repro steps:

1. Create the Text widget in the following way:

			Text text = new Text(myShell, SWT.MULTI);
	  		text.setText("Sample text");
	  		text.addTraverseListener(new TraverseListener () {
	  			public void keyTraversed(TraverseEvent e) {
	  				System.out.println(e.detail + " " + e.doit);
	  			}
	  		});

2. Run the application.
3. Press enter + shift.
4. Press enter.
5. Notice that in both cases the doit value is false.
Comment 1 Eclipse Genie CLA 2018-10-08 03:43:57 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Lars Vogel CLA 2019-09-02 14:58:21 EDT
This bug has been marked as stalebug a while ago without any further interaction.

If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard flag.