mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-03 06:47:33 +00:00
add always-focus to all inputs
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user