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.
Testing using Dublin build 021111_1 of EE on NT, JDK 1.4 Steps to reproduce: open several text files in the source editor edit some text switching back and forth cursor position is lost when select tab for source file using mouse button #1 Note: this does not happen in Explorer...cursor position in Filesystems or other tree is preserved when select different tabs
reproduced. Focus appears in the first button of the editor toolbar. I am not able to find out who change the focus from editor pane to the button. Adding keyword FOCUS
*** Issue 29607 has been marked as a duplicate of this issue. ***
*** Issue 29685 has been marked as a duplicate of this issue. ***
*** Issue 13355 has been marked as a duplicate of this issue. ***
Created attachment 8862 [details] Focus is requested from BasicTabbedPaneUI
I am not sure whether the bug is in JDK or core/windowing system. Reassigning to core for more investigation.
I think it is necessary to overwrite requestDefaultFocus() in TopComponent: org.netbeans.modules.java.JavaEditor$JavaEditorComponent or in some superclass if it is enough to request default focus on editor pane could be possible to overwrite it in some editor subclass of TopComponent like CloneableEditor. I attach diff for org.openide.text.CloneableEditor.
Created attachment 8878 [details] Suggested fix of CloneableEditor
Created attachment 8879 [details] Patch
You can test patch, just put to lib/patches. It works fine for me.
Works for me too. Thanks Marek. Tested on: Operating System = Windows 2000 version 5.0 running on x86 Java; VM; Vendor = 1.4.1; Java HotSpot(TM) Client VM 1.4.1-b21; Sun Microsystems Inc.
I reviewed the patch and it seem to me OK.
Fixed in CloneableEditor. Method requestDefaultFocus() is added to assign focus to editor pane when requestDefaultFocus() is called for TopComponent. Modified: openide/src/org/openide/text/CloneableEditor.java r.1.54
verified in NB3.6 beta