From f8d5fef3c40cb3315f766fb8c78fb5a7ab38441e Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 20 Apr 2021 23:25:56 +0100 Subject: [PATCH] Ensure typedInput without value has focus class removed Closes #2945 --- .../@node-red/editor-client/src/js/ui/common/typedInput.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js index 764c6185c..63455fe17 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js @@ -389,6 +389,11 @@ evt.stopPropagation(); }).on('focus', function() { that.uiSelect.addClass('red-ui-typedInput-focus'); + }).on('blur', function() { + var opt = that.typeMap[that.propertyType]; + if (opt.hasValue === false) { + that.uiSelect.removeClass('red-ui-typedInput-focus'); + } }) // explicitly set optionSelectTrigger display to inline-block otherwise jQ sets it to 'inline'