Community
Participate
Working Groups
Env. : Red Hat 7.2 Tab traversal order seems wrong in modal dialog which extends jface.dialog. Here is a sample class. public class MyDialog extends org.eclipse.jface.dialogs.Dialog { Text fileText; Button browseButton; protected Control createDialogArea(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); Label label = new Label(composite, SWT.NONE); label.setText("File:"); fileText = new Text(composite, SWT.BORDER); browseButton = new Button(composite, SWT.PUSH); browseButton.setText("Browse..."); fileText.setFocus(); return composite; } } Tab traversal order in Windows is; (1) Text widget (2) [Browse...] Button widget (3) [OK] Button widget (4) [Cancel] Button widget (5) Text widget Tab traversal order in Linux is; (1) Text widget (2) [OK] Button widget (3) [Browse...] Button widget (4) Text widget Expected tab traversal order in Linux is; (1) Text widget (2) [Browse...] Button widget (3) [OK] Button widget (4) Text widget
Tab order should be consistent between platforms. org.eclipse.jface.Dialog creates the OK and Cancel buttons after calling createDialogArea, but other than that it has no impact on the tab order.
What about the fact that focus never goes to the Cancel button on linux?
Buttons on Linux are tab items and are traversed using the arrow keys. Try the native file dialog to see this behavior. Buttons on Windows are tab groups. This is the behavior you expected to see on Linux but this goes against the platform look and feel.
I see. Thank you.