This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 11048 - No keyboard traversal for NewAction in single-item form
Summary: No keyboard traversal for NewAction in single-item form
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Peter Zavadsky
Keywords: A11Y, JDK_SPECIFIC
: 23608 (view as bug list)
Depends on: 35827
  Show dependency tree
Reported: 2001-04-04 16:57 UTC by Jesse Glick
Modified: 2008-12-22 23:54 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Snapshot of bean browser area and its context menu (Sh-F10 activation only!) (2.82 KB, image/gif)
2001-11-17 14:18 UTC, Jesse Glick

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2001-04-04 16:57:39 UTC
[release32 mar 31] When navigating context menus via keyboard,
NewAction at least in its one-NewType form cannot be activated by
keyboard (presumably missing keybinding on JInlineMenu).

This could be an accessibility problem--if a mouse is unusable, there will be no
way to select these new types.

Also for similar problems, try uninstalling various combinations of modules that
provide help sets, so that the Shortcuts menu greys out, or Contents greys out,
etc.--keyboard traversal over these menu items is not quite right. I suspect
that some code relating to keyboard focus is missing from JInlineMenu or
Actions.SubMenu, but am not sure what exactly.
Comment 1 Jan Chalupa 2001-05-06 08:14:10 UTC
Target milestone -> 3.3
Comment 2 Peter Zavadsky 2001-10-30 09:51:19 UTC
This should be working now. Closing as invalid for current builds.

Please reopen, if you experience the problem again.
Comment 3 Peter Zavadsky 2001-10-31 08:14:25 UTC
Reopen to adjust the resolution.
Comment 4 Peter Zavadsky 2001-10-31 08:15:42 UTC
I tried it on current buidls and it seems to work. So closing
as worksforme.

Please reopen if I'm wrong.
Comment 5 Jesse Glick 2001-11-17 14:10:47 UTC
Comment 6 Jesse Glick 2001-11-17 14:17:26 UTC
I'm not sure if this was ever really fixed (I don't think it was), but
it is definitely still broken in [dev nov 17]. As an example: in MDI
mode, with apisupport installed, go to the Runtime tab, KB navigate to
Bean Browser, down to Lookup results, Sh-F10 and try to select Add
superclass/interface (this uses NewAction with one NewType). It will
not work, you have to select it from the mouse. Also there is a little
hook that makes it look like there is going to be a submenu, though
there is none; will attach screenshot. Look carefully at the
upper-right corner of the selected menu item.
Comment 7 Jesse Glick 2001-11-17 14:18:52 UTC
Created attachment 3463 [details]
Snapshot of bean browser area and its context menu (Sh-F10 activation only!)
Comment 8 Peter Zavadsky 2001-11-19 08:25:38 UTC
I should have been too sick last week. The problem is of course still
Comment 9 Peter Zavadsky 2001-11-19 09:10:38 UTC
Problem is the Action.SubMenu (which is JMenu instance) is trying to
act like pure JMenuItem in case it includes just one item (new type),
but is 
not the best actor, it just looks like JMenuItem, but when you select
it , it doesn't run the action, but tries to expand sub-menu
(therefore the little thing appears).

CC UI Jiri what solution to take:
1) Make it as normal JMenu, expanding even 1 item in sub-memu,
2) Try to make it better actor of JMenuItem.

The first solution is much easier and error-prone, but is probably not
 the desired. For the second I'm now finding the nice way, but not
sure at the moment if there is such. Let know about it.
Comment 10 Peter Zavadsky 2001-11-19 12:51:16 UTC
Fixed in [main-trunk].

Fix: openide/../openide/awt/ [1.3]

Note: I'v found the solution for the 2), so it will work as designed.
But on the other hand, from the code point its just a hack to UI
class. And I don't like it much. Maybe it will be necessary to rethink
later. The better would be, Actions.SubMenu is JInlineMenu which is
changing the component (JMenuItem, JMenu(Plus)) when needed. But
Actions.SubMenu is public and JMenuPlus already.

Note for testing: You can try it out also on Tools | Options | L&F |
Menubar - its new has now just one item (Add Menu), its menu's has two
items (Add -> Menu, Separator).
Comment 11 Jan Zajicek 2001-11-20 15:46:06 UTC
verified dev#20011120
Comment 12 Jesse Glick 2001-11-23 13:24:10 UTC
NewAction does in fact work fine now, thanks. But I notice that
PasteAction still suffers from the same problem.
Comment 13 Jan Chalupa 2001-11-27 13:04:04 UTC
Target milestone -> 3.3.1.
Comment 14 Peter Zavadsky 2001-11-27 16:02:26 UTC
Jesse, please provide steps for reproducing the prob for the Paste
action. I haven't succeed to do it.
Comment 15 Jesse Glick 2001-11-27 19:17:06 UTC
Neither can I, now (tried in an Ant script). I am sure I saw this
recently for Paste (I specifically tried Add... in the same IDE
session and it was fine) but now I cannot remember what kind of node I
was working on when I saw it. If I find out I will reopen. I don't
imagine you changed anything in the last five days or so.
Comment 16 Jesse Glick 2001-11-27 19:21:20 UTC
Wait, found it. It is fixed in the popup menu, but not in the main
Edit menu. Expand some Ant build script (r33 nov 27), Ctrl-C to copy
some element in it (task, target, whatever), click on its parent (or
anywhere else it could be pasted), then Alt-E and try to select Paste
with the keyboard--problem still exists. S-F10 to get the popup, and
Paste works fine from there. So probably the PopupPresenter and
MenuPresenter do not match.
Comment 17 Peter Zavadsky 2001-11-28 08:37:06 UTC
I got the clue. Anyway, it will be a problem a bit. 
The presenters are OK, they match.

 The problem is following:
 I was fixing the bug the way I hacked our NbPopupMenuUI so it acts
for Action.SubMenu as JMenuItem and not JMenu when it has just one
item etc.
But for menu we there is used standard UI, which of course takes the
Action.SubMenu as JMenu for each cases what is not what we need.
Therefore the behaviour differs between menu's and popup's.

Well it seems for me it wasn't good idea to make SubMenu this way
(acting like JMenuItem and JMenu as well).
I will think about it again.
Comment 18 Jesse Glick 2001-11-28 09:42:04 UTC
Note: I would rank the priority lower in this form: since the popup
version is usable from the keyboard, lack of KB accessibility from the
main menu is not really harmful, at least if you know that the popup
will work. I would suggest P4.
Comment 19 Peter Zavadsky 2001-11-28 15:12:15 UTC
Fixed in [release33]

openide/../openide/awt/ []

Note: I hacked also for Actions.SubMenu for the case it is in 'menu' and
want to act like JMenuItem.
Unfortunatelly the same way woudn't be possible for the case when it
is in 'popup' since the NbPopupMenuUI automatically expands the
sub-menu and passes focus to it.
In future it would be nice to get rid of this dog&cat SubMenu and

I leave it P3, if some problem with A11Y occure again, so it's not
Comment 20 Marian Mirilovic 2002-01-11 16:05:48 UTC
verified in [nb331_dev](20020111)
Comment 21 Jesse Glick 2002-04-07 00:14:34 UTC
Sorry to say that this is broken again, for popups only, and on 1.4
only (1.3.1_02 is OK).

[dev apr 03] Start IDE; I used MDI mode. (I am using Linux 2.4.x w/
Sawmill WM & Gnome.) Click on Explorer to make sure it has focus.
Using KB, navigate to examples/colorpicker/ Expand,
go into Fields. S-F10 to open popup. Move to "Add Field..." with KB
and try to press Enter; the bug appears (little bump appears at edge
of menu item, and menu does not close). Select some field and copy it.
Move back to Fields node, S-F10, Paste -> bug, cannot select. Alt-E to
post Edit menu, move to Paste, hit Enter -> works (tries to paste,
fails because the field name is duplicated though).

Under 1.3.1_02, the popup usage is OK, and menu usage is OK under both

I did not check in 3.3.1 release, only in a dev build.
Comment 22 Jesse Glick 2002-05-20 15:56:58 UTC
*** Issue 23608 has been marked as a duplicate of this issue. ***
Comment 23 Marian Mirilovic 2002-05-20 16:25:36 UTC
It is opened in [orion](020517-rc4) on [jdk1.4](fcs)
Comment 24 Peter Zavadsky 2002-07-04 17:26:51 UTC
Fixed in [trunk]

openide/../awt/ [1.62]

Actions.Submenu was working in pulldown menu only (if pretending to be
a normal menu item), now enabled the same also in popup menu for the
same case.
Comment 25 Marian Mirilovic 2002-07-08 15:01:59 UTC
verified in [nb_dev](20020708)
Comment 26 _ ttran 2002-07-09 10:50:49 UTC
the fix is bad.  It caused issue 25427 which I consider more serious
than this one.

I revert the fix and reopen this issue
Comment 27 Peter Zavadsky 2002-07-09 15:22:43 UTC
Investigated it, and found the problem is there was proceded the
action for the "menu-item-like" Actions.SubMenu also fot the case it
was not the current selected path. The event was sent just for some
preprocessing. (See MenuSelectionManager). Thus the checking if the
path matches the currently selected one. 
Comment 28 Peter Zavadsky 2002-07-09 15:42:38 UTC
Fixed in [trunk] (applied the abovementioned correction).

openide/../awt/ [1.64]
Comment 29 Marian Mirilovic 2002-09-05 11:25:57 UTC
verified in nb3.4
Comment 30 Quality Engineering 2003-07-01 16:32:24 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.