JDK-6348035 : REG: Pressing F10 does not bring up the menu in some cases, on XAWT
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2005-11-09
  • Updated: 2011-01-19
  • Resolved: 2006-03-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b77Fixed
Related Reports
Relates :  
Relates :  
Description
I have a button and a text field inside a frame that has a menu added to it's menubar. Button currently has the focus. On clicking the button, I am disabling the button as well as the text field. So as per the specification, button initiates a forward focus traversal when disabled and focus is shifted to the text field which is also disabled. Now when I press F10, it is not bringing up the menu. But pressing CTRL+SPACE triggers action event for the menu item whose shortcut is set to CTRL+SPACE. But I think F10 should also work fine in this case where it should actually bring up the menu.

This is reproducible only on XAWT with Mustang. This is not reproducible with Motif. This is not reproducible with XAWT on Tiger-FCS and menu appears perfectly. Hence it is a regression introduced in Mustang. This is working fine on Win32 as well. I reproduced it on SolarisSparc10-JDS with Mustang b55-59.

I have attached a sample test. Execute the sample test. You would see a frame with a menu, button and a text field. Click on the 'Disable' button. Button as well as the text field will be disabled. Now focus is retained by the text field. Now press 'F10'. If the menu does not come up, the bug is reproduced.

Comments
EVALUATION Additional and more important consideration here, should we open menu on F10? Swing does it. Gnome does it. AWT didn't it. KDE doesn't it. MS Windows doesn't it either.
02-03-2006

EVALUATION Adding a special clause to process F10 even with a target disabled would help here. Suggested fix provided.
10-11-2005

SUGGESTED FIX ------- XComponentPeer.java ------- *** /tmp/sccs.VeautM 2005-11-10 17:51:04.566557426 +0300 --- XComponentPeer.java 2005-11-10 17:36:26.323175987 +0300 *************** *** 686,691 **** --- 686,695 ---- handleJavaKeyEvent((KeyEvent)e); } } + else if (e instanceof KeyEvent && !((InputEvent)e).isConsumed()) { + // even if target is disabled. + handleF10JavaKeyEvent((KeyEvent)e); + } else if (e instanceof InputMethodEvent) { handleJavaInputMethodEvent((InputMethodEvent) e); }
10-11-2005

EVALUATION It regressed in b51. Most probably after 6236120 patch.
10-11-2005