diff --git a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json index 37e51adf1..a92de4304 100755 --- a/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json +++ b/packages/node_modules/@node-red/editor-client/locales/en-US/editor.json @@ -710,7 +710,8 @@ }, "search": { "empty": "No matches found", - "addNode": "add a node..." + "addNode": "add a node...", + "actions": "search available actions" }, "expressionEditor": { "functions": "Functions", diff --git a/packages/node_modules/@node-red/editor-client/src/js/keymap.json b/packages/node_modules/@node-red/editor-client/src/js/keymap.json index b3544c124..db7c4f77d 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/keymap.json +++ b/packages/node_modules/@node-red/editor-client/src/js/keymap.json @@ -23,7 +23,7 @@ "ctrl-alt-o": "core:open-project", "ctrl-g v": "core:show-version-control-tab", "ctrl-shift-l": "core:show-event-log", - "ctrl-shift-p":"core:show-command-prompt" + "alt-shift-p":"core:show-command-prompt" }, "red-ui-sidebar-node-config": { "backspace": "core:delete-config-selection", diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/commandPrompt.js b/packages/node_modules/@node-red/editor-client/src/js/ui/commandPrompt.js index e86fde55a..733be9aab 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/commandPrompt.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/commandPrompt.js @@ -21,7 +21,6 @@ RED.commandPrompt = (function() { var searchResults; var selected = -1; var visible = false; - var activeElement; var results = []; @@ -29,6 +28,8 @@ RED.commandPrompt = (function() { function search(val) { scopes = {}; + results = []; + selected = -1; val = val ||""; searchResults.editableList('empty'); @@ -40,18 +41,6 @@ RED.commandPrompt = (function() { val = val.trim().toLowerCase(); actions.forEach(function(action) { - if (action.scope && action.scope !== "*") { - if (!scopes.hasOwnProperty(action.scope)) { - var target = activeElement; - while (target.nodeName !== 'BODY' && target.id !== action.scope) { - target = target.parentElement; - } - scopes[action.scope] = (target.nodeName !== 'BODY') - } - if (!scopes[action.scope]) { - return; - } - } action.label = action.id.replace(/:/,": ").replace(/-/g," ").replace(/(^| )./g,function() { return arguments[0].toUpperCase()}); if (val !== "" && action.label.toLowerCase().indexOf(val) === -1) { return; @@ -59,8 +48,6 @@ RED.commandPrompt = (function() { results.push(action); searchResults.editableList('addItem',action) }) - // searchResults.editableList('addItem',{}); - console.log(document.activeElement); } @@ -83,7 +70,7 @@ RED.commandPrompt = (function() { function createDialog() { dialog = $("
",{id:"red-ui-commandPrompt",class:"red-ui-search"}).appendTo("#red-ui-main-container"); var searchDiv = $("
",{class:"red-ui-search-container"}).appendTo(dialog); - searchInput = $('').appendTo(searchDiv).searchBox({ + searchInput = $('').appendTo(searchDiv).searchBox({ delay: 200, change: function() { search($(this).val()); @@ -158,7 +145,6 @@ RED.commandPrompt = (function() { function selectCommand(command) { hide(); RED.actions.invoke(command.id); - console.log(command); } function show(v) { @@ -166,7 +152,6 @@ RED.commandPrompt = (function() { return; } if (!visible) { - activeElement = document.activeElement; RED.keyboard.add("*","escape",function(){hide()}); $("#red-ui-header-shade").show(); $("#red-ui-editor-shade").show();