JDK-5040758 : Popup Menu does not gain focus by default when it is shown on the screen
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2004-04-30
  • Updated: 2020-11-01
  • Resolved: 2020-11-01
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
I am adding a popup menu to a frame and showing when the user clicks the right mouse button within a textarea. When the popup menu is shown, it does not gain focus by default and hence none of the key board traversals work. When I move the mouse over any of the menuitems or sub-menus the menuitems are getting highlighted but not accessible through keys. But When I click any of the sub-menus, the popup menu gains focus and keyboard traversal works after that. But it must gain focus as soon as it is shown.

This is reproducible on SparcSolaris9-CDE on all releases. This works fine on win32. 

I have attached a sample test. Execute the sample test. A frame would appear with a button and a textarea. Right click the mouse inside the textarea and the popup menu will be shown. Check whether it has focus by pressing the arrow keys. If none of the items are selected, the bug is reproduced.

Double clicking the right mouse button inside the popup menu makes the sub-menu appear at improper locations and a separate bug has alredy been filed on that (5040712).

Comments
mawt/MToolkit wa removed
01-11-2020

EVALUATION Name: osR10079 Date: 05/05/2004 This is not a regression and it only affects MAWT. We will investigate it in next release. ###@###.### 2004-05-06 ======================================================================
06-05-2004