Bug 5892 - Context menu should appear close to keyboard focus when triggered from keyboard
Summary: Context menu should appear close to keyboard focus when triggered from keyboard
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2001-11-14 10:25 EST by Nick Edgar CLA
Modified: 2005-05-12 18:44 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 Nick Edgar CLA 2001-11-14 10:25:44 EST
When the context menu is triggered from the keyboard (menu key or SHIFT+F10 on 
Windows), it should appear as close to the keyboard focus as possible, ignoring 
the mouse cursor position.

It currently pops up at the mouse cursor position.

For example, in a text editor, it should pop up by the caret.
If the only keyboard focus is the widget itself, it can pop up at the top left 
of the widget.

This is important for accessibility.
Comment 1 Nick Edgar CLA 2002-05-13 11:29:57 EDT
Is there anything we can do here?
Comment 2 Steve Northover CLA 2002-05-13 14:26:49 EDT
In order to do this properly, we need to go through every widget in SWT and 
decide what the selection is (ie. in a tree, it's the focus item while in a 
text editor, it's the i-beam) and position the menu.  This also would need to 
be done for every platform and for each Custom Widget.

The best answer is to provide a "menu resquested event" that has default values 
for the menu position so that application code can position the menu.

For M6, I suggest that we position the menu at 0,0 if the mouse is outside the 
window, since we don't feel we can get this in for 2.0.
Comment 3 Steve Northover CLA 2002-05-13 18:01:45 EDT
SSQ points out that positioning the menu at 0,0 will obscure the contents of 
the control when the control is small. Also, if the goal is that the origin of 
the menu be inside the control, this already doesn't happen when the widget is 
small and close to the bottom of the screen and the menu is big.

NE, can we not fix this PR right now?
Comment 4 Nick Edgar CLA 2002-05-13 21:25:31 EDT
Not critical for 2.0.  Probably better to leave the current behaviour than 
position at 0@0.  What it means is that someone unable to use the mouse will 
need to use MouseKeys to position the cursor at the center of the screen.
All context menus will then appear there.
Thanks for considering it though.

Comment 5 Steve Northover CLA 2005-05-12 18:44:55 EDT
This is a really old bug that we won't be doing anything about.