Bug 111364 - Preference - Changing formatter profile throws keyboard focus to the preference search Combo
Summary: Preference - Changing formatter profile throws keyboard focus to the preferen...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M3   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords: accessibility, usability
Depends on: 61748
Blocks:
  Show dependency tree
 
Reported: 2005-10-03 14:18 EDT by Randy Hudson CLA
Modified: 2005-11-03 05:14 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Hudson CLA 2005-10-03 14:18:08 EDT
1) Go to "Select a profile" combo in the formatter preference page
2) Choose another profile using the UP or DOWN arrow key

bug: focus is thrown to the workbench's search combo in the top left.
Comment 1 Randy Hudson CLA 2005-10-03 14:21:29 EDT
This is actually slightly worse than I first thought. If the user is attempting 
to navigate through the list of formatters using the keyboard, it is impossible 
because the drop down closes immediately, selecting the formatter option and 
throwing focus.

So, between steps 1&2, insert the following
1.5) press ALT+DOWN_ARROW to open the list of formatters
Comment 2 Randy Hudson CLA 2005-10-03 14:25:53 EDT
see bug 59661 for more discussion on combos, using default selection, and 
pushing on SWT for a new "rollup" event.
Comment 3 Martin Aeschlimann CLA 2005-10-04 03:21:56 EDT
I can't reproduce the focus behaviour you describe neither on 3.1.1 nor I20050928.
(WinXp)
On cursor down, the combo flickers, but keeps the focus. Seems to be an SWT issue.
Comment 4 Randy Hudson CLA 2005-10-04 09:41:39 EDT
Better steps:

1) Display the formatter prefs
2) Make sure the search combo has focus
3) Click on the formatter combo with the mouse
4) Press up/down arrow key

My guess is that this has to do with deactivating and reactivating the Shell.
Comment 5 Steve Northover CLA 2005-10-04 22:28:44 EDT
What does "rollup" event have to do with it?

Without fighting through the code, does anyone have an idea what events are 
involved so I know where to start?  For example, is anyone doing work on 
SWT.Traverse, SWT.Activate, SWT.Focus etc. If "rollup" would help, do tell.
Comment 6 Randy Hudson CLA 2005-10-05 11:05:27 EDT
The problem is caused by the shell becoming disabled. A rollup event would 
reduce how often selection changes get processed, resulting in fewer cases 
where the shell gets disabled, which collapses the combo and sometimes throws 
foucs to the wrong widget.

Here's the stacktrace:
Shell.setEnabled(boolean) line: 1008
ProgressManager.setUserInterfaceActive(boolean) line: 1184
ProgressManager.access$5(ProgressManager, boolean) line: 1180
ProgressManager$3.run() line: 860
BusyIndicator.showWhile(Display, Runnable) line: 69
ProgressManager.busyCursorWhile(Runnable, ProgressMonitorJobsDialog) line: 895
ProgressManager.busyCursorWhile(IRunnableWithProgress) line: 871
ProgressManager.run(boolean, boolean, IRunnableWithProgress) line: 1070
ProfileManager.flushPreferences(IEclipsePreferences) line: 562
ProfileManager.writeToPreferenceStore(ProfileManager$Profile, IScopeContext) 
line: 553
ProfileManager.commitChanges(IScopeContext) line: 687
CodeFormatterConfigurationBlock$StoreUpdater.update(Observable, Object) line: 84
Comment 7 Steve Northover CLA 2005-10-05 14:20:55 EDT
You are asking that they change the UI metaphore for Combo in this dialog for 
a SWT.READ_ONLY Combo.  The Combo bug 59661 refers to an editable Combo and 
requests behavior like IE.  I'm not sure it applies.

In any case, the correct SWT behavior is happening.  The shell is being 
disabled.  Therefore, the user can't interact with the Combo.  That 
can't/shouldn't be changed so I need to mark this as WONTFIX.

Thanks to Randy for chasing down the stack trace.
Comment 8 Randy Hudson CLA 2005-10-05 14:30:02 EDT
Steve, I think there are several potential problems/workarounds, separate from 
the rollup event request

bugs?
1) why does Shell.setEnabled(true) restore focus to the wrong widget in the 
steps described in comment 4.
2) why does the Combo close when I am trying to navigate through its entired? 
Probably because the shell gets disabled, so this is w.a.d.

workarounds?
3) Should JDT use the default selected event instead of selected event. Based 
on your last comment, you are saying that because the combo is not editable, 
then the user would not expect to have to press ENTER. Also, I agree a "reload" 
button won't work here.
4) Could JDT use a timer or something else to allow the user to navigate 
through the combo but not immediately apply the selection.
5) Send an event when the readonly combo closes, or avoid sending selection 
events until then. This is covered in another bug.

Are 1-4 all WONTFIX?
Comment 9 Steve Northover CLA 2005-10-05 15:12:09 EDT
Item 1) sounds like a bug, please open a new report.  However, I'm not sure 
the combo actually took focus when the mouse went down so it might be platform 
behavior, rather than focus being restored to the wrong widget.

Item 2) is the reason we have the problem in the first place and the correct 
resolution is WONTFIX.  That's what this bug report is about and we shouldn't 
take any action here.

Items 3) and 4) are up to the application code and have nothing to do with SWT.

Item 5) is a feature request that is already being tracked by a bug report.
Comment 10 Randy Hudson CLA 2005-10-05 16:02:01 EDT
> Items 3) and 4) are up to the application code and have nothing to do with 
SWT.
Which is why the bug report was filed JDT in the first place.

Martin, workaround #74 would be to not use BusyCursor in flushPreferences. 
There is also another bug tracking the fact that the change should not be 
agressively saved anyway.
Comment 11 Randy Hudson CLA 2005-10-05 16:03:14 EDT
bug 101619 will make this go away?
Comment 12 Martin Aeschlimann CLA 2005-10-06 11:45:51 EDT
fixed > 20051006

Fix for bug 101619 solves the problem.
Comment 13 Benno Baumgartner CLA 2005-11-01 10:37:48 EST
Verified using I20051031-2000