This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 18729
Collapse All | Expand All

(-)src/org/netbeans/core/windows/frames/NbFocusManager.java (+16 lines)
Lines 96-101 Link Here
96
        KeyStroke key = KeyStroke.getKeyStrokeForEvent(anEvent);
96
        KeyStroke key = KeyStroke.getKeyStrokeForEvent(anEvent);
97
        MenuSelectionManager selManager = MenuSelectionManager.defaultManager();
97
        MenuSelectionManager selManager = MenuSelectionManager.defaultManager();
98
        MenuElement[] elems = selManager.getSelectedPath();
98
        MenuElement[] elems = selManager.getSelectedPath();
99
100
        // if menu popup is active and the user presses Escape we dismiss the
101
        // popup and consume the event, otherwise pressing Escape on a popup
102
        // displayed in a Dialog also dismisses the Dialog.
103
        
104
        if (elems != null
105
            && elems.length > 0
106
            && !(elems[0].getComponent() instanceof ComboPopup)
107
            && anEvent.getID() == KeyEvent.KEY_PRESSED
108
            && anEvent.getModifiers() == 0
109
            && anEvent.getKeyCode() == KeyEvent.VK_ESCAPE
110
            ) {
111
            selManager.clearSelectedPath();
112
            anEvent.consume();
113
            return;
114
        }
99
        
115
        
100
        if (! isTransmodalAction(key)) {
116
        if (! isTransmodalAction(key)) {
101
            Window w = SwingUtilities.windowForComponent(focusedComponent);
117
            Window w = SwingUtilities.windowForComponent(focusedComponent);

Return to bug 18729