Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368205 - Text widget with SWT.MULTI style: Both return key and return key + shift, produce TraversalEvent with doit field set to false.
Summary: Text widget with SWT.MULTI style: Both return key and return key + shift, pro...
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7.1   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-09 18:35 EST by Jan Opacki CLA
Modified: 2019-09-02 14:58 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.