From 1b53b5b92792b714600869f5d0b8822f1e140079 Mon Sep 17 00:00:00 2001 From: Steve-Mcl Date: Wed, 20 Jul 2022 12:30:15 +0100 Subject: [PATCH] focus stack when re-showing nested editor --- .../node_modules/@node-red/editor-client/src/js/ui/editor.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js index fb4c200f5..be114c4a8 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js @@ -1105,6 +1105,10 @@ RED.editor = (function() { if (editing_node) { RED.sidebar.info.refresh(editing_node); RED.sidebar.help.show(editing_node.type, false); + //ensure focused element is NOT body (for keyboard scope to operate correctly) + if (document.activeElement.tagName === 'BODY') { + $('#red-ui-editor-stack').trigger('focus') + } } } }