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 b6c11e5f3..d7da5d06e 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 @@ -250,25 +250,24 @@ RED.editor = (function() { var newWidth = input.width(); var attrStyle = input.attr('style'); var m; - if ((m = /width\s*:\s*(\d+(%|[a-z]+))/i.exec(attrStyle)) !== null) { - newWidth = m[1]; + if ((m = /width\s*:\s*([^;]+)/i.exec(attrStyle)) !== null) { + newWidth = m[1].trim(); } else { newWidth = "70%"; } - var outerWrap = $("
").css({display:'inline-block',position:'relative'}); - var selectWrap = $("").css({position:'absolute',left:0,right:'40px'}).appendTo(outerWrap); - var select = $('').appendTo(selectWrap); - - outerWrap.width(newWidth).height(input.height()); - if (outerWrap.width() === 0) { - outerWrap.width("70%"); - } + var outerWrap = $("").css({ + width: newWidth, + display:'inline-flex' + }); + var select = $('').appendTo(outerWrap); input.replaceWith(outerWrap); // set the style attr directly - using width() on FF causes a value of 114%... - select.attr('style',"width:100%"); + select.css({ + 'flex-grow': 1 + }); updateConfigNodeSelect(property,type,node[property],prefix); $('') - .css({position:'absolute',right:0,top:0}) + .css({"margin-left":"10px"}) .appendTo(outerWrap); $('#'+prefix+'-lookup-'+property).on("click", function(e) { showEditConfigNodeDialog(property,type,select.find(":selected").val(),prefix);