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

Bug 283714

Summary: TraverseListener in IE
Product: [RT] RAP Reporter: Moritz Hanke <mhanke>
Component: WorkbenchAssignee: Project Inbox <rap-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: asen, tjodes, webmaster
Version: 1.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Moritz Hanke CLA 2009-07-16 10:29:14 EDT
Build ID: 20090621-0832

Steps To Reproduce:
I want to jump with TraverseListener and setFocus() from one textfield to another. This is working in Firefox 3.5 but not in IE 8.

1. create three textfields
2. add TraverseListener on textfield one
3. in this TraverseListener jump to textfield three with setFocus()


More information:
t = new Text(top, SWT.NONE);
t.addTraverseListener(new TraverseListener() {

  public void keyTraversed(TraverseEvent e) {
    if (e.detail == SWT.TRAVERSE_TAB_NEXT) {
        t3.setFocus();
    }
  }
});
new Text(top, SWT.NONE);
t3 = new Text(top, SWT.NONE);

Regards

Moritz
Comment 1 Asen Draganov CLA 2009-07-31 03:47:20 EDT
Reproduced also in webkit-based browsers (Safari and Chrome).
Comment 2 Markus Krüger CLA 2009-09-17 09:28:22 EDT
Any plans when this gets fixed?
Comment 3 Rüdiger Herrmann CLA 2009-10-05 05:37:29 EDT
This will most likely not work in SWT either. Within the listener, the focus is set to "t3" and afterwards the default behavior of the tab key moves to focus to the next control.
Adding "e.doit = false;" to the if-clause solves the problem.