From 7c5413e568eab28c1fe892c51e39557492cbaaef Mon Sep 17 00:00:00 2001 From: Steve-Mcl Date: Wed, 20 Jul 2022 12:29:16 +0100 Subject: [PATCH 1/3] ensure red-ui-editor-stack is focusable --- packages/node_modules/@node-red/editor-client/src/js/red.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/red.js b/packages/node_modules/@node-red/editor-client/src/js/red.js index 55446418b..7544434b7 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/red.js +++ b/packages/node_modules/@node-red/editor-client/src/js/red.js @@ -766,7 +766,7 @@ var RED = (function() { $('
').appendTo(header); $('
'+ '
'+ - '
'+ + '
'+ '
'+ '
'+ '
'+ From 1b53b5b92792b714600869f5d0b8822f1e140079 Mon Sep 17 00:00:00 2001 From: Steve-Mcl Date: Wed, 20 Jul 2022 12:30:15 +0100 Subject: [PATCH 2/3] 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') + } } } } From 273404e24df2ca863ef7397a82cc1b344fed50ac Mon Sep 17 00:00:00 2001 From: Steve-Mcl Date: Wed, 20 Jul 2022 12:30:52 +0100 Subject: [PATCH 3/3] focus search input when opened via context menu --- .../@node-red/editor-client/src/js/ui/contextMenu.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js b/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js index 66ae2b943..1ace19a75 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js @@ -67,6 +67,10 @@ RED.contextMenu = (function () { splice: isSingleLink ? selection.links[0] : undefined, // spliceMultiple: isMultipleLinks }) + }, + onpostselect: function() { + // ensure quick add dialog search input has focus + $('#red-ui-type-search-input').trigger('focus') } }, (hasLinks) ? { // has least 1 wire selected