Can anyone improve on this quick fix?
Problem:
Clicking outside the editor window used to close it, and since recent updates this behaviour was changed. (I believe this change may be reverted in a future update but not sure when.)
Workaround:
Pressing Ctrl-Enter doesn't work when the editor window is not in focus. It's possible to set the scope of the shortcut to work globally (thanks @Steve-Mcl)
BUT...
It has still been annoying me for other reasons - I'll spare you the full tour of my brain's complaint list here though ![]()
Solution
- Create a file called "editor-fix.js" in .node-red/public:
(function() {
RED.events.on("editor:open", function() {
$("#red-ui-editor-shade").off("mousedown.trayfix");
$("#red-ui-editor-shade").on("mousedown.trayfix", function(e) {
if ($(e.target).closest(".red-ui-tray").length === 0) {
if (!RED.view.dragging && !RED.view.touchDragging) {
RED.tray.close();
}
}
});
});
})();
- in .node-red/settings.js, add this
page: {
scripts: [
"editor-fix.js"
]
}
to the editorTheme section
THE ISSUE WITH THIS: it doesn't save the editor contents (as per previous behaviour) so if anyone knows how to achieve that with a similar "fix" pls let me know ![]()
