diff --git a/platform/platform-api/src/com/intellij/openapi/ui/ComponentWithBrowseButton.java b/platform/platform-api/src/com/intellij/openapi/ui/ComponentWithBrowseButton.java index 6be27c5629cd..f1f26fba8915 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/ComponentWithBrowseButton.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/ComponentWithBrowseButton.java @@ -52,6 +52,8 @@ public class ComponentWithBrowseButton extends JPanel i public ComponentWithBrowseButton(Comp component, @Nullable ActionListener browseActionListener) { super(new BorderLayout(SystemInfo.isMac? 0 : 2, 0)); myComponent = component; + // required! otherwise JPanel will occasionally gain focus instead of the component + setFocusable(false); add(myComponent, BorderLayout.CENTER); myBrowseButton=new FixedSizeButton(myComponent);