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 jan 07, MDI] Start NB. Close welcome window. Click on sampledir and Ctrl-0 to open new explorer view window. Dock it into Editor mode. Click in new Explorer (root = sampledir). Has focus; arrow keys move in it. Press Ctrl-2. Filesystems Explorer has focus and is selected. Press Ctrl-3. New explorer window is selected acc. to background color (and Explorer mode is not, according to title bar color) yet KB focus is still in Filesystems Explorer! Bordered blue selection rectangle indicating KB focus is in Filesystems Explorer. You need to click the mouse in the new explorer to give it KB focus; you cannot give it KB focus using the KB.
It seems to be a problem when the focused TopComponent is ExplorerPanel. When the second component is CloneableEditor it works fine. Reason it works C-2 is that there is a workaround, see the fix in issue #28757. So now I don't know, how it should work. Anyway, the focus management in winsys, is quite complicated to me. I probably add similar hack to editro view action.
It seems CloneableEditor works fine just because it overwrites requestFocus, where it transfers the focus to the pane. Well, probably the same should be done to ExplorerPanel, but I'm not sure now, the focus policy in 1.3 and 1.4 is a bit different.
Fixed in [trunk] openide/src/org/openide/explorer/ExplorerPanel.java 1.39 core/src/org/netbeans/core/actions/ViewFilesystemsTabAction.java 1.3 core/src/org/netbeans/core/actions/ViewRuntimeTabAction.java 1.3 projects/src/org/netbeans/modules/projects/ViewProjectsTabAction.java 1.3 Note: I fixed it the way ExplorerPanel transfers the focus to the default focusable component (the approach CloneableEditor uses). Thus I removed the hacks from issue #28757. In sum: it needs to be really though out how the focus should be handled in TopComponents propertly, our policy is changing from fix to fix (like when the focusability was disabled) and doesn't seem to have any understandable direction.
verified in [nb_dev](20030203)
Usage requestDefaultFocus() in ExplorerPanel causes issue #30758. I think subclasses of ExplorerPanel should explicitly request focus on their desired subcomponent (like eg.CloneableEditor does).
I added requestFocus() to NbMainExplorer$ExplorerTab. Project should also add the same to their tab (as I assume they also subclass ExplorerPanel). Modified: core/src/org/netbeans/core/NbMainExplorer.java r.1.113
Still broken in [dev feb 11] for Explorer vs. Options window: dock Options into MDI frame. Make sure it has focus (click on it, make sure arrow keys work). Press Ctrl-2. Select Window -> Options. Options panel now has focus border (and Explorer [Filesystems] has grey title bar) but Explorer still has KB focus (and thick border on selected node).
Encountered again in [dev 030402]. Click on some folder in Filesystems. Press Ctrl-F to open search dialog. Type in some text that will get at least one match. Search Results open. If not already in desktop pane, select Window -> Frame Resides -> In IDE Desktop. Click on some result file and double-click a result line. The Editor window opens with focus at that line. Press Ctrl-F4 to close Editor. Search Results still open but not focused or selected. Select Alt-W 3 to select Search Results. It is now selected (blue border in desktop frame), but no focus. Press TAB a few times and you will see focus on the unselected Explorer window. You can move around selection in the Explorer (but property sheet does not update, etc.). 100% reproducible for me. You cannot give KB focus to the Search Results dialog as far as I can tell.
Because Window System v1 will not be supported from now by our team, all old winsys issues (now "core/window system v1" issues) are going to be closed as WONTFIX. Changes in API which emerged both from UI spec and problems with adjusting to the older API are described in the document http://core.netbeans.org/windowsystem/changes.html. It shows also recommends how the client code should be adjusted to the new window system. If you think this issue apply also to the new winsys then change the subcomponent (to "core/window system") and REOPEN it.
issue doesn't apply to new window system - verified