summaryrefslogtreecommitdiffstats
path: root/src/schemes/about
diff options
context:
space:
mode:
Diffstat (limited to 'src/schemes/about')
-rw-r--r--src/schemes/about/profiles.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/schemes/about/profiles.c b/src/schemes/about/profiles.c
index d5e3d61..ede57c7 100644
--- a/src/schemes/about/profiles.c
+++ b/src/schemes/about/profiles.c
@@ -186,6 +186,7 @@ static const gchar *cp_script =
"var radio = parent.querySelector(\"input[type=radio]\");\n"
"var svg = parent.querySelector(\"svg\");\n"
"var colorInput = parent.querySelector(\"input[type=hidden]\");\n"
+ "var nameInput = parent.querySelector(\"input[type=text]\");\n"
"var cpDiv = parent.querySelector(\"div.color-picker\");\n"
"var slide = cpDiv.querySelector(\"div.slide\");\n"
"var slideInd = cpDiv.querySelector(\"div.slide-indicator\");\n"
@@ -207,6 +208,7 @@ static const gchar *cp_script =
" for (var i = 0; i < cps.length; ++i) {\n"
" cps[i].style.display = \"none\";\n"
" }\n"
+ " nameInput.focus();\n"
"});\n"
"svg.addEventListener(\"click\", function (event) {\n"
" if (radio.checked) {\n"
@@ -294,10 +296,10 @@ generate_div(MqProfiles *profiles, gchar *id)
NULL),
mq_html_buttonbox(NULL, "OK", NULL, "Cancel"),
NULL),
- mq_html_container("script", NULL, g_strdup(cp_script), NULL),
mq_html_container("span", is_current ? "current" : NULL, name,
NULL),
mq_html_input_text(name_str, NULL, name, id == NULL),
+ mq_html_container("script", NULL, g_strdup(cp_script), NULL),
mq_html_submit(launch_str, "Launch", FALSE),
mq_html_submit(default_str, "Make Default",
!id || mq_profiles_is_default(profiles, id)),