add always-focus to all inputs

This commit is contained in:
inventivetalent
2018-10-19 21:03:22 +02:00
parent 4adfd7a83e
commit 6b200cdf00

View File

@@ -6284,7 +6284,7 @@ LGraphCanvas.onShowTitleEditor = function( value, options, e, menu, node )
var dialog = document.createElement("div");
dialog.className = "graphdialog";
dialog.innerHTML = "<span class='name'>Title</span><input autofocus type='text' class='value'/><button>OK</button>";
dialog.innerHTML = "<span class='name'>Title</span><input autofocus onblur='this.focus()' type='text' class='value'/><button>OK</button>";
var input = dialog.querySelector("input");
if(input)
{
@@ -6533,10 +6533,10 @@ LGraphCanvas.prototype.showEditPropertyValue = function( node, property, options
var input_html = "";
if(type == "string" || type == "number" || type == "array")
input_html = "<input autofocus type='text' class='value'/>";
input_html = "<input autofocus onblur='this.focus()' type='text' class='value'/>";
else if(type == "enum" && info.values)
{
input_html = "<select autofocus type='text' class='value'>";
input_html = "<select autofocus onblur='this.focus()' type='text' class='value'>";
for(var i in info.values)
{
var v = info.values.constructor === Array ? info.values[i] : i;
@@ -6546,7 +6546,7 @@ LGraphCanvas.prototype.showEditPropertyValue = function( node, property, options
}
else if(type == "boolean")
{
input_html = "<input autofocus type='checkbox' class='value' "+(node.properties[property] ? "checked" : "")+"/>";
input_html = "<input autofocus onblur='this.focus()' type='checkbox' class='value' "+(node.properties[property] ? "checked" : "")+"/>";
}
else
{