mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-64850 Go to Declaration, when Quick search is open, takes you to quick search field
This commit is contained in:
@@ -719,6 +719,13 @@ public class JBTabsImpl extends JComponent
|
||||
return new ActionCallback.Done();
|
||||
}
|
||||
else {
|
||||
Component owner = myFocusManager.getFocusOwner();
|
||||
JComponent c = info.getComponent();
|
||||
if (c != null && owner != null) {
|
||||
if (c == owner || SwingUtilities.isDescendingFrom(owner, c)) {
|
||||
return new ActionCallback.Done();
|
||||
}
|
||||
}
|
||||
return requestFocus(getToFocus());
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ final class EditorTabbedContainer implements Disposable, CloseAction.CloseTarget
|
||||
}, "EditorChange", null);
|
||||
return result;
|
||||
}
|
||||
});
|
||||
}).getPresentation().setRequestFocusOnLastFocusedComponent(true);
|
||||
|
||||
setTabPlacement(UISettings.getInstance().EDITOR_TAB_PLACEMENT);
|
||||
|
||||
|
||||
+1
-12
@@ -581,18 +581,7 @@ public class EditorsSplitters extends JPanel {
|
||||
if (window != null) {
|
||||
final EditorWithProviderComposite selectedEditor = myCurrentWindow.getSelectedEditor();
|
||||
if (selectedEditor != null) {
|
||||
boolean alreadyFocused = false;
|
||||
final JComponent comp = selectedEditor.getComponent();
|
||||
final Component owner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
|
||||
if (owner != null && comp != null) {
|
||||
alreadyFocused = owner == comp || SwingUtilities.isDescendingFrom(owner, comp);
|
||||
}
|
||||
|
||||
if (requestFocus && !alreadyFocused) {
|
||||
IdeFocusManager.getInstance(myManager.getProject()).requestFocus(comp, requestFocus).doWhenDone(fireRunnable);
|
||||
} else {
|
||||
fireRunnable.run();
|
||||
}
|
||||
fireRunnable.run();
|
||||
}
|
||||
} else {
|
||||
fireRunnable.run();
|
||||
|
||||
Reference in New Issue
Block a user