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 17257 - Popup menu from S-F10 does not have KB focus
Summary: Popup menu from S-F10 does not have KB focus
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: _ ttran
URL:
Keywords: A11Y
Depends on:
Blocks: 17197
  Show dependency tree
 
Reported: 2001-11-02 14:29 UTC by Jesse Glick
Modified: 2008-12-23 13:34 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
diff against release33 to fix the bug (1.36 KB, patch)
2002-01-28 13:50 UTC, _ ttran
Details | Diff
jar patch for release33 build (4.22 KB, application/octet-stream)
2002-01-28 15:43 UTC, _ ttran
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2001-11-02 14:29:09 UTC
[dev nov 2] At least in the Editor and I think in the Explorer as well, under
Linux Enlightenment (with or without netbeans.popup.linuxhack), pressing S-F10
opens the popup menu but does not put KB focus on it; the first menu item is
selected but moving arrow keys moves in the Editor, not the popup (which stays
open).

At first I thought this was a problem with the proposed patch to issue #17197,
but in fact it occurs without this patch anyway.
Comment 1 _ ttran 2001-11-02 20:41:14 UTC
Jesse, my hypothesis: you use "focus follows mouse".  S-F10 to invoke
the popup, the mouse pointer is on the popup, the popup is a native
window (looks like it's always heavyweight even in cases when the
popup does not exceed the frame), you move the mouse out of the popup,
now the frame has focus.  At this moment key event handling is totally
broken, our hack in NbFocusManager stops working.

Correct?
Usually the poup is dismissed when the focus is changing to another
Window.  But by moving the mouse off the popup back to already focused
Frame does not fire any event.

In stock Swing you cannot navigate popup using kbd.  We are hacking
the focus manager to make it work.  S-F10 doesn't have anything to do
with it.  You can right-click to invoke the popup and then use kbd to
navigate
Comment 2 Jesse Glick 2001-11-03 14:28:24 UTC
I do use focus-follows-mouse but I use MDI mode, which means popups
ought to all be lightweight. And the problem occurs after just
pressing S-F10 and then arrow keys, without moving the mouse. (If I
wanted to touch the mouse, I would use it for the popup to begin
with.) So I think it has to be another problem.

I think this was broken recently, I definitely used to use popup menus
entirely from the keyboard. I just noticed this problem maybe a few
days ago.
Comment 3 _ ttran 2001-11-05 09:24:06 UTC
I have a strong feeling that the popup is heavyweight even though it
should not be.  And I cannot reproduce the problem with Enlightenment
on my laptop without moving the mouse.
Comment 4 Jesse Glick 2001-11-05 14:03:34 UTC
It is still reproducible for me in [dev nov 5]. Using Enlightenment on
Gnome, Linux 2.2.12 (RHL 6.1), MDI mode. Only happens with popup in
editor--the popup from the Explorer is fine.
Comment 5 _ ttran 2001-11-08 17:53:28 UTC
Jesse, I am not able to reproduce this bug.  You have to fix it
yourself :-)  Hint: all the logics is in NbFocusManager
Comment 6 _ ttran 2001-11-09 10:51:11 UTC
Jesse, I bet that this is a bug in JDK 1.3.1, upgrading to 1.3.1_01
will solve your problem
Comment 7 Jesse Glick 2001-11-09 11:24:39 UTC
OK, I will try that. (Yes I am using 1.3.1.)
Comment 8 Jesse Glick 2001-11-09 12:07:22 UTC
That's it, fixed by using 1.3.1_01. Thanks.
Comment 9 Jesse Glick 2002-01-27 21:17:53 UTC
I am now using 1.3.1_02 (have been for a while) and this suddenly
became broken again in development builds, sometime before Jan 24th,
but not long before. The popup opens, but arrow keys move in the
focused component (Explorer, Editor, ...) rather than the popup. Usage
with a mouse is fine. What changed recently?
Comment 10 _ ttran 2002-01-28 13:24:52 UTC
Also does not work in release33!!

I broke it in the fix for #17257 (Alt+<letter> bug).  Now popup
navigation does not work in MDI mode.

Fix will be attached here soon.  This is a showstopper for 3.3.1
release, raised prio to P2
Comment 11 _ ttran 2002-01-28 13:33:10 UTC
> I broke it in the fix for #17257 (Alt+<letter> bug)

typo! it's bug 17548, not 17257

Comment 12 _ ttran 2002-01-28 13:46:57 UTC
fixed in trunk, patch for release33 will be attached here
Comment 13 _ ttran 2002-01-28 13:50:51 UTC
Created attachment 4454 [details]
diff against release33 to fix the bug
Comment 14 _ ttran 2002-01-28 15:43:00 UTC
Created attachment 4457 [details]
jar patch for release33 build
Comment 15 Marian Mirilovic 2002-01-28 16:29:12 UTC
verified patch with build [nb_3.3.1-rc3](200201280331) (testcases) :

- (SDI && MDI) x ([jdk1.4](91) &&  [jdk1.3.1](02))
1. it's possible work with popup menu in Explorer by keyboard
(S-F10,Up/Down/Left)
2. it's possible invoke Main menu by F10 (F10, Up/Down, Left/Right)
3. it's possible invoke Menu from main Menu by Alt + <letter>
4. it's possible invoke Help from Options window by Alt-H

On Solaris5.8(CDE) and W2K.

In my opinion it works fine.

Trung (Jesse), 
have we test anything else ?

Comment 16 _ ttran 2002-01-28 16:47:39 UTC
you need to test only on JDK 1.3.  JDK 1.4 is not affected by the bug
at all.
Comment 17 Jan Zajicek 2002-01-28 16:50:28 UTC
Patch verified on Solaris - KDE - the same scenario as Marian's.
Comment 18 Jan Chalupa 2002-01-28 17:23:53 UTC
Approved by QA.
Comment 19 iformanek 2002-01-28 17:55:36 UTC
Approved
Comment 20 iformanek 2002-01-28 18:00:52 UTC
Approving for Evan as well
Comment 21 _ ttran 2002-01-28 20:24:15 UTC
fix integrated into release33
Comment 22 Marian Mirilovic 2002-01-29 09:33:05 UTC
verified in [nb_3.3.1-rc3](200201290331), on [jdk1.3.1](02) and
[jdk1.4](91) Sol5.8/W2K
Comment 23 Jan Chalupa 2002-01-29 09:43:49 UTC
I still have a problem on Windows with 1.4. S-F10 in Explorer opens
the context menu, but when I try to use arrow keys to select any item,
the native window menu (Restore/Move/Size/Maximize/Minimize/Close)
opens and the keybord events go there.

The problem occurs in both SDI and MDI, the only difference is that in
SDI, Explorer's window menu opens, while in MDI, it's Main window's menu.

When the Explorer's context menu is opened via the right mouse-click,
the arrow keys works as expected. The problem cannot be reproduced on
1.3.x.
Comment 24 Jan Zajicek 2002-01-29 11:06:11 UTC
Correcting version fields.
Comment 25 Marian Mirilovic 2002-01-29 12:22:58 UTC
Honza, I have found correct number for your described behaviour, see
issue 17958.
Comment 26 Jesse Glick 2002-07-02 22:39:41 UTC
This seems to have broken for me recently in dev builds, only in the
case of the Editor. JDK 1.4.0_01, Linux Sawfish, MDI mode.
Consistently, S-F10 works fine in the Explorer; from the Editor, the
popup is posted but there is no KB navigation for it, rather the
cursor remains blinking in the editor window and keystrokes (like
arrow keys) just move the cursor. Anyone else see this?
Comment 27 _ ttran 2002-07-08 15:28:06 UTC
I see it too (Linux/sawfish/Hopper-b16).  Some other observations

- detach the editor mode into a separate SDI frame and back to MDI
main window -> it works again
- the same problem happens to popup in output window
- popup in form designer works fine

At this moment I really can't guess what's happening.  Everything is
possible

Reopening...
Comment 28 _ ttran 2002-07-09 10:21:52 UTC
regression caused by pzavadsky's fix for issue 23113
DefaultContainerImpl.java rev 1.61
Comment 29 _ ttran 2002-07-09 10:28:02 UTC
DefaultContainerImpl.java rev 1.62
Comment 30 Marian Mirilovic 2002-10-25 14:31:09 UTC
verified in NB3.4
Comment 31 Quality Engineering 2003-07-01 16:23:43 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.