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 169682

Summary: Find operation causes Editor to lose focus
Product: editor Reporter: _ gtzabari <gtzabari>
Component: -- Other --Assignee: mslama <mslama>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description _ gtzabari 2009-08-02 05:48:09 UTC
There is a very annoying bug that causes the editor to lose keyboard focus. I run into it very often but it's been
difficult tracking down how to reproduce it. The following steps work for me:

1) Select some text from the editor (say "Panel") and copy it into the clipboard using CTRL+C
2) CTRL+F (Find)
3) CTRL+V (Paste)
4) Enter (find first match)
5) Escape (close Find)
6) CTRL+F (Find)
7) Enter (close find)
8) Escape (close Find)
9) Editor will lose keyboard focus

Please let me know if you can reproduce it. Please note that this is a regression relative to Netbeans 6.5.1.
Comment 1 mslama 2009-08-03 08:26:53 UTC
*** Issue 169683 has been marked as a duplicate of this issue. ***
Comment 2 mslama 2009-08-03 08:27:12 UTC
*** Issue 169684 has been marked as a duplicate of this issue. ***
Comment 3 mslama 2009-08-03 11:10:25 UTC
I tried with latest dev build (my own from jet-main) and I cannot reproduce. Does it happen always for you or is it
random? When it happens use Ctrl-Shift-Break. (It is special shortcut in IDE to log current focus owner to console.)

  Product Version         = NetBeans IDE Dev (Build 090803) (#d821016ff984)
  Operating System        = Linux version 2.6.28-14-generic running on i386
  Java; VM; Vendor        = 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02; Sun Microsystems Inc.
  Runtime                 = Java(TM) SE Runtime Environment 1.6.0_15-b03
  Java Home               = /usr/java/jdk1.6.0_15/jre
  System Locale; Encoding = en_US (nb); UTF-8
Comment 4 _ gtzabari 2009-08-03 18:33:41 UTC
mslama,

I can reproduce this issue 100% of the time but I just noticed that when it gets into the bad state, I can hit the up
arrow key to get the focus back but hitting the down arrow key does not work. Please only use the down-arrow when trying
to reproduce the problem.

Here is the focus owner in the bad state:

*** ShortcutAndMenuKeyEventProcessor: current focus owner =
javax.swing.JToolBar[,0,0,897x25,layout=java.awt.GridBagLayout,alignmentX=0.0,alignmentY=0.0,border=org.netbeans.swing.plaf.winvista.EditorToolbarBorder@d7c232,flags=328,maximumSize=,minimumSize=,preferredSize=,floatable=false,margin=,orientation=HORIZONTAL,paintBorder=true]
Comment 5 mslama 2009-08-11 18:47:28 UTC

*** This issue has been marked as a duplicate of 168397 ***