Skip to content

Commit 300a8d3

Browse files
committed
Click to close search box
1 parent e3b7c5f commit 300a8d3

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

editor/js/ui/search.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ RED.search = (function() {
2020
var searchInput;
2121
var searchResults;
2222
var selected = -1;
23+
var visible = false;
2324

2425
var index = {};
2526
var keys = [];
@@ -232,16 +233,8 @@ RED.search = (function() {
232233
function reveal(node) {
233234
hide();
234235
RED.view.reveal(node.id);
235-
// if (node.type === 'tab' || node.type === 'subflow') {
236-
// RED.workspaces.show(node.id);
237-
// } else {
238-
// if (node._def.category !== 'config' && node.z) {
239-
// RED.workspaces.show(node.z);
240-
// }
241-
// }
242236
}
243237

244-
var visible = false;
245238
function show() {
246239
if (!visible) {
247240
RED.keyboard.add("*",/* ESCAPE */ 27,function(){hide();d3.event.preventDefault();});
@@ -276,6 +269,10 @@ RED.search = (function() {
276269

277270
function init() {
278271
RED.keyboard.add("*",/* . */ 190,{ctrl:true},function(){show();d3.event.preventDefault();});
272+
$("#header-shade").on('mousedown',hide);
273+
$("#editor-shade").on('mousedown',hide);
274+
$("#palette-shade").on('mousedown',hide);
275+
$("#sidebar-shade").on('mousedown',hide);
279276
}
280277

281278
return {

red/api/locales/en-US/editor.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"displayConfig": "Configuration nodes",
4040
"import": "Import",
4141
"export": "Export",
42-
"search": "Find",
42+
"search": "Search flows",
4343
"clipboard": "Clipboard",
4444
"library": "Library",
4545
"examples": "Examples",

0 commit comments

Comments
 (0)