From a7150d1ec62db19d54c389b1086c385ee046dfc7 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Thu, 10 Mar 2011 13:17:57 +0300 Subject: [PATCH] when focus is on hint, ESC handler should work fine too --- .../platform-impl/src/com/intellij/ui/LightweightHint.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ui/LightweightHint.java b/platform/platform-impl/src/com/intellij/ui/LightweightHint.java index a4782f4bf755..43369e484b02 100644 --- a/platform/platform-impl/src/com/intellij/ui/LightweightHint.java +++ b/platform/platform-impl/src/com/intellij/ui/LightweightHint.java @@ -121,8 +121,8 @@ public class LightweightHint extends UserDataHolderBase implements Hint { LOG.assertTrue(myParentComponent.isShowing()); myEscListener = new MyEscListener(); - myComponent.registerKeyboardAction(myEscListener, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), - JComponent.WHEN_IN_FOCUSED_WINDOW); + myComponent.registerKeyboardAction(myEscListener, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); + myComponent.registerKeyboardAction(myEscListener, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_FOCUSED); final JLayeredPane layeredPane = parentComponent.getRootPane().getLayeredPane(); myComponent.validate();