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 187dc066c..41c731e3b 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 @@ -583,7 +583,7 @@ var height = relativeTo.height(); var menuHeight = menu.height(); var top = (height+pos.top); - if (top+menuHeight > $(window).height()) { + if (top+menuHeight-$(document).scrollTop() > $(window).height()) { top -= (top+menuHeight)-$(window).height()+5; } if (top < 0) { @@ -692,8 +692,10 @@ }); if (this.typeList.length < 2) { this.selectTrigger.attr("tabindex", -1) + this.selectTrigger.on("mousedown.red-ui-typedInput-focus-block", function(evt) { evt.preventDefault(); }) } else { this.selectTrigger.attr("tabindex", 0) + this.selectTrigger.off("mousedown.red-ui-typedInput-focus-block") } this.selectTrigger.toggleClass("disabled", this.typeList.length === 1); this.selectTrigger.find(".fa-caret-down").toggle(this.typeList.length > 1) @@ -707,6 +709,11 @@ this.propertyType = null; this.type(currentType); } + if (this.typeList.length === 1 && !this.typeList[0].icon && (!this.typeList[0].label || this.typeList[0].showLabel === false)) { + this.selectTrigger.hide() + } else { + this.selectTrigger.show() + } }, width: function(desiredWidth) { this.uiWidth = desiredWidth;