From 157f33e3f3ba211b7bd6afe728b66d4594a4e429 Mon Sep 17 00:00:00 2001 From: "Denis.Zhdanov" Date: Thu, 24 May 2012 15:35:33 +0400 Subject: [PATCH] IDEA-86572 UI: Return ability to navigate to the editor by pressing Esc at the detached tool window --- .../wm/impl/commands/RequestFocusInEditorComponentCmd.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/commands/RequestFocusInEditorComponentCmd.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/commands/RequestFocusInEditorComponentCmd.java index 1adb4f46851e..96c0f77c6384 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/commands/RequestFocusInEditorComponentCmd.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/commands/RequestFocusInEditorComponentCmd.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2012 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -86,7 +86,8 @@ public final class RequestFocusInEditorComponentCmd extends FinalizableCommand{ return; } - if (owner instanceof IdeFrameImpl && IdeFrameImpl.getActiveFrame() != owner) { + final Window activeFrame = IdeFrameImpl.getActiveFrame(); + if (activeFrame != null && owner instanceof IdeFrameImpl && activeFrame != owner) { myDoneCallback.setRejected(); return; }