From d93a3e22c9673a4795524ff5fcddef1fbe64292f Mon Sep 17 00:00:00 2001 From: David Kaltschmidt Date: Fri, 11 Dec 2015 11:34:18 +0100 Subject: [PATCH] Dont deselect node on ESC if there is a controlPipe --- client/app/scripts/actions/app-actions.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/client/app/scripts/actions/app-actions.js b/client/app/scripts/actions/app-actions.js index 0278dd707..e52b8639e 100644 --- a/client/app/scripts/actions/app-actions.js +++ b/client/app/scripts/actions/app-actions.js @@ -117,15 +117,8 @@ export function enterNode(nodeId) { } export function hitEsc() { - // - // This simulates an "ESC-stack" - // 1st esc removes the controlPipe and closes the terminal. - // 2nd esc deselects the node and closes the details. - // - const controlPipe = AppStore.getControlPipe(); - if (controlPipe) { - clickCloseTerminal(controlPipe.id, true); - } else { + // Dont deselect node on ESC if there is a controlPipe (keep terminal open) + if (AppStore.getSelectedNodeId() && !AppStore.getControlPipe()) { AppDispatcher.dispatch({type: ActionTypes.DESELECT_NODE}); updateRoute(); }