Merge pull request #1265 from ShivangiKakkar/fixes-1028
#1028 resolves focus name field on opening new container sub-panel
This commit is contained in:
@@ -1016,6 +1016,11 @@ 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");
|
||||||
|
window.requestAnimationFrame(() => {
|
||||||
|
containerName.select();
|
||||||
|
containerName.focus();
|
||||||
|
});
|
||||||
[...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;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user