[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-text-dev] JDT breadcrumb drop-down focus question.

> What I see is that when the breadcrumb drop-down is opened using the 
> keyboard or using the drop-down action button, the focus is set to the 
> drop-down immediately.  However, when the drop-down is opened by 
> mouse-clicking on one of the breadcrumb items, the drop-down is opened, 
> but the focus is not set to the shell.  Only when user clicks in the 
> drop-down, if finally gets the keyboard focus.

When the user clicks the item, we open the drop-down as a courtesy, but 
the user's action was really to select
the item in the breadcrumb. The focus needs to stay on the item, so that 
the user can open a context menu or
invoke any action that works with the item as selection (e.g. Search, Show 
In, etc.).

When the user clicks the arrow button, she really asks for the drop-down, 
and in this case, we do give focus
to the drop-down.

> This has some ugly side 
> effects, e.g. the scroll-wheel does not work on XP as expected 

That's bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=75766 . Either 
use a better mouse driver
or vote for a solution in SWT. We should not work around this just in some 
places in the SDK.

> I'm very curious to hear your insights, but one option I'm considering 
> is adding a MouseEnter listener to the drop down, and just grab the 
> focus as soon as yhe user mouses over the drop-down.  This would 
> minimize the annoying behavior, but it doesn't seem like the "correct" 
> solution.

Please don't add a MouseEnter listener. We should not impose a specific OS
behavior on the user. On Linux and Windows, the user can choose "focus 
follows mouse" mode.