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 25337 - Editor content panel loses focus after find command
Summary: Editor content panel loses focus after find command
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Windows 95/98
: P2 blocker (vote)
Assignee: Peter Zavadsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-03 04:47 UTC by bht
Modified: 2008-12-23 09:41 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bht 2002-07-03 04:47:52 UTC
1) This editor is really smart and makes my work a
lot easier. Thanks a lot :)

2) The bug in 3.4 beta 2 on Windows95.

2.1) How to reproduce
- Edit a java source file
- Put your mouse out of reach (important)
- Press [Ctrl+F], enter find text and press [enter]
- Press [F3] to repeat current find.

2.2) Expected result
- The focus should be on the relevant found
occurence of the find text.
- Multiple occurrences should be highlighted yellow
- on [F3], the cursor should move to the next
occurrence

2.3) Actual result
- The cursor APPEARS to be on the first found
occurence of the find text
- The text is highlighted grey
- on [F3], nothing happens
- on any typing nothing happens
- If I click with the mouse on the content panel then
  - focus is restored
  - multiple found text occurrences are
highlighted as expected.


2.3) Comments

I think this is very reproducible and does not
require a special testcase.

The behavior of the editor is otherwise very
polished. While one could argue that the bug is
only minor I would like to see it in the context
of a highly polished product.

And as such I think Netbeans should not afford to
have this bug. It makes working with the keyboard
difficult. I hope for you that it is not too hard
to fix this. Good luck and thanks again.

Bernard
Comment 1 bht 2002-07-03 06:03:31 UTC
Should have mentioned JDK1.4.1 beta
Comment 2 Jan Kovar 2002-07-08 15:33:59 UTC
Hello Bernard,

I was trying to reproduce this issue on Windows2000 (as 
the Windows 95 is not supported platform) and I was not 
able to reproduce it.

Could you be so kind and try it with FCS versions of both 
JDK and Netbeans? 
Comment 3 bht 2002-07-14 13:14:46 UTC
Sorry for the delay.
At present I cannot reproduce the error with:
- Netbeans 3.4 beta 3
- java version "1.4.0_01"

Are you interested in another test with

- Netbeans 3.4 beta 3
- java version 1.4.1 beta?

Comment 4 Marek Grummich 2002-07-22 10:08:45 UTC
Set target milestone to TBD
Comment 5 Miloslav Metelka 2002-07-26 14:26:58 UTC
Yes, could you please check possibly the RC1 with the 1.4.1? Many
thanks. Do you use the IDE in MDI or SDI mode?
Comment 6 bht 2002-07-27 09:20:58 UTC
I have re-installed JDK/JRE 1.4.1 with my current IDE 3.4 Beta 3
200207111250.
The bug is back with JDK 1.4.1, so it could be a JDK issue.

I found an even easier way to reproduce it:

- Press [Ctrl+F] (the dialog pops up)
- Press [Alt+Tab] to another application (typically to copy some find
text to the clipboard)
- Press [Alt+Tab] again to switch back to netBeans
- paste or enter find text and press [enter]

Again, there is no cursor in the editable area but the found text has
a gray highlight.

I can't figure out where the focus is but when I press [Shift+Tab],
then the focus moves to the JComboBox on the toolbar.

I have not yet downloaded RC1 because it is currently not recommended.

BTW, I noticed that (my) bug 21326 (Jar file content file corrupted
after switching projects) is a P1 bug. But if you are interested to
know, for daily productivity 21326 does not count for me because I
just write a batch file for the jar file creation. I can live without
it. But this bug, and bug 20732 are nerve wrecking for me because I
have to write a lot of code. These bugs are right at the center of the
most basic editing activity. They should have P1 instead although I
have to admit that they are not dataloss. They cause brain loss :)
Comment 7 bht 2002-10-06 06:56:35 UTC
I am raising the priority of this because it now occurs in the JDK
1.4.1 FCS with the NetBeans 3.4 release 200208222340.

I have been working with the 3.4 release for weeks now and with JDK
1.4.0 there was no single occurrence of this bug.

Today I installed JDK 1.4.1 and the error is back again.

It reproduces easily, even on the first find (no [F3] required to
reproduce).
Type your search text and press [Enter]. After hitting [Enter] (DO NOT
mouse click on [OK] because that works) the focus is often lost (in
fact the focus it is on the editor toolbar).
Press [Shift+Tab] 4 times or to get the focus right again.

I have tried this many times and it appears that it always works with
the mouse but in roughly 30% of the time with the keyboard. Please
consider that with a reproducibility of only 30% at my end this issue
might take you some time to reproduce depending on your hardware and
your working style.

Please also consider that I raised issue 27333 which reproduces at a
similar low rate however it uncovered a fundamental bug in the
NetBeans framework.

I am struggling with the effects of this bug in combination with bugs
27333,  27331 and 20732. I am finding it really hard to use NetBeans
although I am very committed to it.

Thanks,
Bernard
Comment 8 bht 2002-10-06 11:44:40 UTC
Now I have done my last outstanding bit - I installed NetBeans 3.4 on
another machine under Win98 and JDK1.4.1.
Exactly the same symptoms. I have skipped the [F3] bit because the
simple initial focus fails anyway.

It fails in SDI mode with a single full screen editor window. MDI
(which I am not using because I don't like it and it slows everything
down) seems to be OK.

So it's your turn now. Please let me know if you need any more help
with reproducing this.
BTW there is still another focus problem (too many IMHO):
Refer to issue 27731. I am using NetBeans 10 hours a day 7 days a
week. I think you can imagine that I am getting a bit frustrated.
Comment 9 Martin Roskanin 2002-10-11 13:40:04 UTC
It seems that the problem is in core.
Here is the conclusion of the investigation:

In org.netbeans.core.windows.frames.ShortcutAndMenuKeyEventProcessor,
 in the method dispatchKeyEvent(KeyEvent ev) is the call of the 
DefaultContainerImpl.runPendingNodeActivator(). IMHO, this hack is
responsible for strange focus manipulation of the JavaEditor TopComponent.

If the find dialog is closed by mouse,
ShortcutAndMenuKeyEventProcessor doesn't call this pendingNode... and
the focus is handled OK.

Reassigning to core for further evaluation.
Comment 10 Martin Roskanin 2002-10-15 10:55:21 UTC
*** Issue 27995 has been marked as a duplicate of this issue. ***
Comment 11 Peter Zavadsky 2002-10-15 14:12:55 UTC
The problem with this is "pending node activator hack"(its main reason
has to do with showing popup). If disabled this issue is fixed.

There is an effort about actions which could eliminate of use of the
hack. See issue #27868.
Comment 12 mslama 2002-10-23 13:47:49 UTC
Please can you check with dev build from 23 Oct? It might be connected
with issue #27731. Unfortunately I am not able to reproduce described
behaviour on my Linux machine with KDE 2.1.1, dev build 22 Oct where
#27731 was not fixed yet, JDK 1.4.1_01. Thanks.
Comment 13 Peter Zavadsky 2002-10-29 15:13:20 UTC
It seems it is working now, after the Marek's fix of the issue #27731.
I can't reproduce it now.
Please reopen if you do.
Comment 14 Jesse Glick 2002-11-29 15:11:04 UTC
Hmm, I'm sure I had such problems at least in early November builds. I
will reopen as necessary.
Comment 15 Marian Mirilovic 2003-01-08 11:54:11 UTC
verified in [nb_dev](20030108)
Comment 16 Jan Chalupa 2003-11-03 15:22:06 UTC
Previously VERIFIED issue that was mistakenly put into the NEW
state... closing again...
Comment 17 Jan Chalupa 2003-11-03 15:22:39 UTC
... verified.