From b0d93df3870567c01cf060ebe6a073bbb204b2e4 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 26 Apr 2019 16:33:43 +0100 Subject: [PATCH] Blur the active element when closing edit dialog via action Fixes #2097 --- .../node_modules/@node-red/editor-client/src/js/ui/editor.js | 2 ++ 1 file changed, 2 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 102374c29..68e74fbc3 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 @@ -2431,10 +2431,12 @@ RED.editor = (function() { init: function() { RED.tray.init(); RED.actions.add("core:confirm-edit-tray", function() { + $(document.activeElement).blur(); $("#node-dialog-ok").click(); $("#node-config-dialog-ok").click(); }); RED.actions.add("core:cancel-edit-tray", function() { + $(document.activeElement).blur(); $("#node-dialog-cancel").click(); $("#node-config-dialog-cancel").click(); });