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 65326 - editor focus lost when "quickfix" popup used
Summary: editor focus lost when "quickfix" popup used
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P2 blocker (vote)
Assignee: Jan Pokorsky
: 87874 88646 92905 111842 (view as bug list)
Depends on:
Blocks: 60235
  Show dependency tree
Reported: 2005-09-29 11:46 UTC by jportway
Modified: 2007-10-17 17:10 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description jportway 2005-09-29 11:46:20 UTC
this is probably related to issue 60235, and is intended as a usecase for that.
in 5.0 beta, after selecting an option from the "Quickfix" popup menu focus is lost in the current editor 
window, and clicking in the editor doesn't regain focus. The only way to regain focus in the editor is to 
first focus another component (eg, clicking in the project view, switching editor tabs etc.).
Comment 1 Milos Kleint 2005-09-29 15:04:39 UTC
Comment 2 David Simonek 2005-09-29 16:08:53 UTC
Passing to Milos.
Comment 3 Milos Kleint 2005-09-30 12:31:27 UTC
a workaround is to select the quickfix using the keyboard, avoiding the mouse.
then it works ok.
Comment 4 Milos Kleint 2005-10-05 15:43:34 UTC
reassigning to java.

a few hints guys. the problem appears on macosx with 1.5 java only.
I suspect the problem is focus transfer that happens when one clicks on the
popup. That causes the popup components to be scheduled to receive focus.
however then immediately the popup is hidden. the popup factory not only hides
the components but also removes them from te frame. 
Then the focus manager gets confused and cannot resolve correctly who is to
receive focus. 

not sure how to workaround the problem. i've filed  a focus related issue at
apple, not sure this is covered by it though.
Comment 5 Milos Kleint 2005-10-19 13:29:42 UTC
I've filed a bug at apple's tracking system as I wrote a simple testcase that
demonstrates the problem we have.
Comment 6 Milos Kleint 2006-10-27 08:13:03 UTC
*** Issue 87874 has been marked as a duplicate of this issue. ***
Comment 7 Jiri Prox 2006-11-06 08:49:27 UTC
*** Issue 88646 has been marked as a duplicate of this issue. ***
Comment 8 Tomasz Slota 2006-11-20 10:22:56 UTC
I can reproduce it in 80% on my laptop and it gives an extremely bad user experience (consider P1). 
Switching between tabs doesn't help, I need to open some dialog (using mouse/main menu as the 
shortcuts does not work when there is no focus). Many users will not find the simple workaround (opening 
another dialog) and will restart the IDE instead. Can you provide a link to the apple issue?
Comment 9 Milos Kleint 2006-11-20 10:46:33 UTC
no, I cannot. Apple doesn't provide a viewable bug tracking database. After you
signup, you have only access to the issues you filed.
Comment 10 Jiri Prox 2007-01-22 07:49:23 UTC
*** Issue 92905 has been marked as a duplicate of this issue. ***
Comment 11 Jan Becicka 2007-02-16 17:42:06 UTC
Is this issue reproducible in current trunk build?
Comment 12 Tomasz Slota 2007-02-16 21:01:18 UTC
I haven't seen it for a long while, I don't even think it is reproducible in the late builds of 5.5. Green light 
for "WORKSFORME" ;-)
Comment 13 jportway 2007-02-17 01:50:32 UTC
I agree - I think there are still some focus related issues in there somewhere, but they aren't nearly as 
severe as this. I haven't noticed this one for a while - where it was a fix in NB or a fix from Apple in AWT I 
don't know.
Comment 14 jportway 2007-02-25 15:40:30 UTC
I spoke too soon - there's still a problem there in 6.0m7. Sometimes focus is lost after using the code 
completion popup (or any popup in the editor i think), and the only way to get focus back is to close the 
file that you're currently editing and re-open it. It's happening quite a bit. I don't think this was such a 
problem in 5.5.
This is a really, really painful bug for anyone using netbeans on OSX - please raise the priority of it if 
Comment 15 Tomasz Slota 2007-02-28 13:29:07 UTC
I confirm the problem has reappeared (coincidence??) and is TERRIBLY annoying.
Comment 16 Jan Lahoda 2007-03-23 12:46:40 UTC
Lets try to find a workaround for NB6.0. Milos, Tomas, we will probably need
help with this.
Comment 17 Petr Hrebejk 2007-08-03 14:10:33 UTC
*** Issue 111842 has been marked as a duplicate of this issue. ***
Comment 18 _ tboudreau 2007-08-03 16:55:17 UTC
Milos, do you still have that test case?  The problem is pretty bad on JDK 5 on mac.  See additional comments in issue 111842
Comment 19 Jan Lahoda 2007-08-23 10:29:30 UTC
Milos, Tomas, any new info and/or hints? Thanks.
Comment 20 Jan Pokorsky 2007-09-05 20:24:32 UTC
I can reproduce it with invoking the editor hints popup for a missing import and selecting the popup item by mouse. If I
use solely keybord everything seems to work as expected. From the debugger I found that the focus is requested on the
configuration combo box in the main toolbar. I have to click to the editor to get the focus back.

I'll try to find some workaround for NB 6.0.
Comment 21 Jan Pokorsky 2007-09-06 10:29:56 UTC
fixed in

/cvs/editor/hints/src/org/netbeans/modules/editor/hints/,v  <--
new revision: 1.35; previous revision: 1.34

If you have another focus issue with editor hints focus please reopen with detailed steps how to reproduce.