removing event loop and using requestAnimationFrame
This commit is contained in:
parent
e1c1ac4bd9
commit
aada0419eb
1 changed files with 4 additions and 5 deletions
|
@ -1002,11 +1002,10 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
|
|||
document.querySelector("#edit-container-panel-name-input").value = identity.name || "";
|
||||
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);
|
||||
window.requestAnimationFrame(() => {
|
||||
containerName.select();
|
||||
containerName.focus();
|
||||
});
|
||||
[...document.querySelectorAll("[name='container-color']")].forEach(colorInput => {
|
||||
colorInput.checked = colorInput.value === identity.color;
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue