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.
[dev oct 24; 1.4.1, MDI, Linux 2.4.7, Sawfish WM, sloppy focus] Sometimes, but not always, when I press Alt-Left or Alt-Right to switch source editor tabs, the focus ends up not in the editor pane, but in the tab (I can see the blue border around it). This only started happening recently, so it is a regression. Pressing TAB when this happens moved into the pane. However, you cannot even get in the habit of doing this (annoying as that would be), because sometimes focus goes straight into the pane as before, so pressing TAB would insert a TAB character! Makes it very hard to type between text buffers because these familiar keyboard shortcuts are unpredictable. Must check screen for result every time. This just adds to the uncomfortably large number of situations where the editor does not have focus when it should - after using any dialog, for example. Only pattern I can see: if you have focus in a pane, these shortcuts will leave it on the tab after switching tabs. If you have focus on a tab, the shortcuts still work, and sometimes deposit focus in the new pane, sometimes in the new tab.
I will investigate it. It could be caused by my fix of another focus issue #27731. Fix was comitted on 22 Oct so it appeared from 23 Oct dev build.
*** Issue 28266 has been marked as a duplicate of this issue. ***
Yes it is caused by fix of #27731. Swing retarget focus to our JTabbedPane after focus was assigned correctly to QuietEditorPane subcomponent of editor TopComopnent. I tried to disable focus on JTabedPane and it works. I hope it does not break something else. (Popup menu works and winsys dnd should work too without granting focus to JTabbedPane. Closing tabs using close button works too.) I will commit this fix. If it will fail it will require revision of #27731 fix too.
Fixed in main trunk. I tested on JDK 1.4.1_01 and JDK 1.3.1_05 on Linux. Modified: core/src/org/netbeans/core/windows/frames/CloseButtonTabbedPane.java r.1.8
Thanks, that seems to have worked. There are still other situations where I lose focus on a tab pane when I should not, but these can be filed separately.