fix-#1028 resolves focus name field on opening new container sub-panel
This commit is contained in:
parent
99db192792
commit
7f7f221a79
1 changed files with 6 additions and 1 deletions
|
@ -1001,6 +1001,12 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
|
||||||
|
|
||||||
document.querySelector("#edit-container-panel-name-input").value = identity.name || "";
|
document.querySelector("#edit-container-panel-name-input").value = identity.name || "";
|
||||||
document.querySelector("#edit-container-panel-usercontext-input").value = userContextId || NEW_CONTAINER_ID;
|
document.querySelector("#edit-container-panel-usercontext-input").value = userContextId || NEW_CONTAINER_ID;
|
||||||
|
const containerName = document.querySelector("#edit-container-panel-name-input");
|
||||||
|
setTimeout(function()
|
||||||
|
{
|
||||||
|
containerName.focus();
|
||||||
|
containerName.select();
|
||||||
|
}, 0);
|
||||||
[...document.querySelectorAll("[name='container-color']")].forEach(colorInput => {
|
[...document.querySelectorAll("[name='container-color']")].forEach(colorInput => {
|
||||||
colorInput.checked = colorInput.value === identity.color;
|
colorInput.checked = colorInput.value === identity.color;
|
||||||
});
|
});
|
||||||
|
@ -1015,7 +1021,6 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
|
||||||
|
|
||||||
// P_CONTAINER_DELETE: Delete a container.
|
// P_CONTAINER_DELETE: Delete a container.
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
Logic.registerPanel(P_CONTAINER_DELETE, {
|
Logic.registerPanel(P_CONTAINER_DELETE, {
|
||||||
panelSelector: "#delete-container-panel",
|
panelSelector: "#delete-container-panel",
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue