|
@@ -127,6 +127,15 @@ export function renderMenu (
|
|
|
|
|
|
menu_var_or_value = $(menu_var_or_value);
|
|
|
|
|
|
+ menu_var_or_value.find('.width-dynamic').on('input', function() {
|
|
|
+ var input_field = $(this);
|
|
|
+ var inputWidth = input_field.textWidth()+10;
|
|
|
+ inputWidth = inputWidth<50?50:inputWidth;
|
|
|
+ input_field.css({
|
|
|
+ width: inputWidth
|
|
|
+ })
|
|
|
+ }).trigger('input');
|
|
|
+
|
|
|
dom_object.append(menu_var_or_value);
|
|
|
|
|
|
ref_object.dom_object = menu_var_or_value;
|
|
@@ -1697,6 +1706,17 @@ function openInputToValue (
|
|
|
'<input type="text" size="2" class="width-dynamic-minus" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />'
|
|
|
);
|
|
|
field.insertBefore(dom_object.find(".menu_var_or_value_dom"));
|
|
|
+
|
|
|
+
|
|
|
+ field.on('input', function() {
|
|
|
+ var input_field = $(this);
|
|
|
+ var inputWidth = input_field.textWidth()+10;
|
|
|
+ inputWidth = inputWidth<50?50:inputWidth;
|
|
|
+ input_field.css({
|
|
|
+ width: inputWidth
|
|
|
+ })
|
|
|
+ }).trigger('input');
|
|
|
+
|
|
|
const rendered = $('<div class="value_rendered"></div>');
|
|
|
rendered.insertBefore(field);
|
|
|
|