From 3b8539b73cbe66144b73b720bb316ee9ab42e05b Mon Sep 17 00:00:00 2001 From: Nadya Zabrodina Date: Fri, 4 Dec 2015 13:44:07 +0300 Subject: [PATCH] [vcs]: IDEA-148529 'Move to another changelist' dialog looses focus from edit text field when new changelist was preselected and 'preselect' shortcut was pressed --- .../openapi/vcs/changes/ui/ChangeListChooserPanel.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListChooserPanel.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListChooserPanel.java index 1c5a0bae9e51..64ff963c0625 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListChooserPanel.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeListChooserPanel.java @@ -33,6 +33,8 @@ import org.jetbrains.annotations.Nullable; import javax.swing.*; import java.awt.*; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.util.*; @@ -99,6 +101,12 @@ public class ChangeListChooserPanel extends JPanel { } }); myNewListPanel.init(null); + myRbNew.addFocusListener(new FocusAdapter() { + @Override + public void focusGained(FocusEvent e) { + getPreferredFocusedComponent().requestFocusInWindow(); + } + }); final ComboboxSpeedSearch search = new ComboboxSpeedSearch(myExistingListsCombo); search.setComparator(new SpeedSearchComparator(true, false)); }