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 33143 - first keystroke often lost after moving cursor in java editor
Summary: first keystroke often lost after moving cursor in java editor
Status: VERIFIED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: Macintosh Mac OS X
: P1 blocker with 1 vote (vote)
Assignee: issues@editor
URL:
Keywords: JDK_SPECIFIC
Depends on:
Blocks:
 
Reported: 2003-04-22 22:38 UTC by jportway
Modified: 2008-06-26 14:06 UTC (History)
2 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 jportway 2003-04-22 22:38:18 UTC
after clicking to move the cursor from one place to another, it seems to happen more 
often if some text was previously selected.
Comment 1 Miloslav Metelka 2003-04-23 12:54:38 UTC
Could you please check whether information on
http://testwww.netbeans.org/kb/articles/mac.html
might help you?
Comment 2 rongoldman 2003-05-05 02:33:30 UTC
I'm seeing the same behavior: in the editor select some text, type a
character nothing happens, type a second character & it then replaces
the selected text. Also do a move cursor to previous word command &
again the first character typed is ignored.

This seems to be caused by Apple's new 1.4.1 version of Java. If I run
NetBeans in the 1.3.1 JVM the problem does not happen.

Also in various text edit fields in dialogs/wizards I noticed that
there was often a notable lag between when I typed some characters and
when they finally were displayed.
Comment 3 smilet 2003-06-05 20:08:02 UTC
I was going to write this one up as well. I see it all the time on Mac OS X 10.2.6, Java 
1.4.1, Netbeans 3.5 RC3, in the Metal Look & Feel. This seems to happen in the 
following fashion:
1. Type some text in the netbeans Editor.
2. The autocorrection feature detects some bug
3. Focus is lost
4. Click anywhere in the window
5. The cursor appears where you clicked. You think you can start typing but actually you 
can't because ...
6. Press any key. The key is ignored but focus is regained
7. Press more keys. They are acknowledged.

It is particularly annoying since this happens constantly. It generates a lot of bugs and 
slows me down. Definitely a show-stopper.
Comment 4 rongoldman 2003-06-17 01:18:16 UTC
The cause seems to be limited to the source editor. I just disabled
automatic parsing and that had no effect.

However here's maybe another clue. In the editor I have the Global Key
Bindings for the "Insertion Point to Previous Word
[caret-previous-word]" action mapped to both Alt+Left & Ctrl+Left. If
I move the cursor using the Alt+Left keys, then the next character I
type is lost. However if I move back with Ctrl+Left, the next
character typed is inserted correctly. 

For a Mac user this makes the source editor unusable---hence NetBeans
is unusable. How do we get the priority set to either P1 or P2?
Comment 5 Miloslav Metelka 2003-06-19 08:39:12 UTC
Tomasi, could you please reproduce it on your machine? TIA.
Comment 6 Tomas Hurka 2003-06-20 11:37:32 UTC
I am sorry, but I cannot reproduce it. I followed steps provided by smilet, but everything 
works fine. The difference was, that at step 3, I did not lose focus. I tested it with NB 35 
FCS. Current dev. version is also OK. 
Comment 7 Miloslav Metelka 2003-06-20 15:52:25 UTC
Could there be anything specific e.g. a resident program that could
cause that difference?
Or are there e.g. different types of focus traversal e.g.
focus-follows-mouse in Mac OS X?
Sorry I'm not a Mac expert.
Comment 8 rongoldman 2003-06-20 22:57:40 UTC
Thanks for following up on this bug. It really makes it impossible to
use NetBeans on the Mac.

The Mac does not have different types of focus traversal, so that's
not the issue.

Try these steps to see if you can reproduce the problem:

1. add "Alt+Left" to the Global Key Bindings for the "Insertion Point
to Previous Word [caret-previous-word]" action 

2. in the editor move to the end of some line (Ctrl+E)

3. move the cursor back a word using the Alt+Left keys

4. type a character --- nothing happens, it is lost

5. type a second character --- it is inserted correctly

6. move back again using Ctrl+Left

7. type a character --- this time it works properly

I'm using Mac OS 10.2.6, Java 1.4.1, NetBeans 3.5 FCS.

p.s. maybe smilet or jportway could try to confirm that the above
steps cause the error?

Comment 9 Miloslav Metelka 2003-06-23 10:22:10 UTC
Aha, I probably understand what could be wrong. The Alt+Left and
Alt+Right are by default mapped to switching of the active view to
previous/next one at the system level (under the Window menu).
Unfortunately the editor's global keybinding list editor does not show
the clash because the system keybindings are maintained separately. 

Could you please remap the system keybindings for switching views to
another shortcuts? It can be done under Tools->Keyboard Shortcuts
(scroll down to Window node).
Comment 10 rongoldman 2003-06-23 22:29:52 UTC
I just remapped the system keybindings for switching views and it had
no effect---the first character typed is still lost after moving the
insertion point forwards or back a word using Alt+Right or Alt+Left.

However maybe it has to do somehow with Alt & Meta commands? (or the
arrow keys?) I have also remapped "move insertion point to start/end
of line" to Meta+Left and Meta+Right. After doing either of those
commands the next character typed is also lost. The commands are also
mapped to Ctrl+A and Ctrl+E which work fine---the next char typed is
inserted just fine.

I just tried typing Meta+Up & Meta+Down, which are not mapped to any
commands as far as I can tell, and indeed after typing them the next
character is lost! 

Comment 11 Tomas Hurka 2003-07-16 14:38:55 UTC
After careful reading I think that this bug can be connected to issue #32872. If you have 
access to latest JDK developer preview (DP102) from Apple, you can try it and let us 
know, if you can reproduce it. I have DP 102 and cannot reproduce it using your steps 
from 2003-06-20. BTW: I don't think this is P1 issue.
Comment 12 rongoldman 2003-08-13 00:00:31 UTC
I finally had a chance to install Apple's latest JDK developer preview
(DP102) and with it the bug now seems to be gone. All the things that
previously caused me to lose a keystroke now work fine. So looks like
this bug can be closed.
Comment 13 Tomas Hurka 2003-08-13 09:00:56 UTC
Ron, thanks for testing. I am closing this as WONTFIX, since it is a bug in JDK. 
Comment 14 pfelenda 2003-09-09 14:15:26 UTC
Verified