From cee287da99f1533b0a88c0ed74f95de906e74e8c Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Tue, 12 Jul 2022 02:09:20 +0900 Subject: [PATCH] Focus editor for undo after some actions in menu --- .../node_modules/@node-red/editor-client/src/js/ui/group.js | 4 ++++ .../node_modules/@node-red/editor-client/src/js/ui/subflow.js | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/group.js b/packages/node_modules/@node-red/editor-client/src/js/ui/group.js index e11a55660..add6da6c9 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/group.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/group.js @@ -308,6 +308,7 @@ RED.group = (function() { RED.history.push(historyEvent); RED.view.select({nodes:[group]}); RED.nodes.dirty(true); + RED.view.focus(); } } } @@ -330,6 +331,7 @@ RED.group = (function() { RED.history.push(historyEvent); RED.view.select({nodes:newSelection}) RED.nodes.dirty(true); + RED.view.focus(); } } @@ -424,6 +426,7 @@ RED.group = (function() { }); RED.history.push(historyEvent); RED.nodes.dirty(true); + RED.view.focus(); } } @@ -451,6 +454,7 @@ RED.group = (function() { } } RED.view.select({nodes:selection.nodes}) + RED.view.focus(); } } function createGroup(nodes) { diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js index 3aeb7151f..d15e52283 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js @@ -877,6 +877,7 @@ RED.subflow = (function() { RED.nodes.dirty(true); RED.view.updateActive(); RED.view.select(null); + RED.view.focus(); }