I attach an excerpt of the code that I hope you understand. Basically, there are two navigations to interact with the user. In the secondary navigation “document.querySelector(”#info“).setAttribute(”open“);” when an action is performed through a form, it generates a batchplay with gaussianBlur and close that do not work. The rest of operations such as copy, do work.
Thanks in advance
document.getElementById(“id”0015).addEventListener(“click”, async function () {
await require("photoshop").core.executeAsModal(getInfo, {});
document.querySelector(“#info”).setAttribute("open");
});
…
<sp-dialog id=“info”
…
<form id=“cForm”
<div class=“item”
Copyright :</label
<input type=“text” class=“value” id=“00124” name=“Copyright”
</div
</form
…
<sp-button-group slot=“buttongroup”
<button id=“plusInfoBtn">Generar capa</button
</sp-button-group
</sp-dialog
…
document.getElementById(“plusInfoBtn”).addEventListener(“click”, async function () {
await require(“photoshop”).core.executeAsModal(getInfo, {});
});
…
async function getInfo() {
const photoshop = require(“photoshop”);
…
try {
await photoshop.core.executeAsModal(async () => {
const batchPlay = photoshop.action.batchPlay;
await batchPlay([
{
“_obj”: “gaussianBlur”,
“radius”: {
“_unit”: “pixelsUnit”,
“_value”: 40.0
}
}
], {});
}, { commandName: ‘Combinar y Mover Visibles’ });
} catch (error) {
console.error(“getInfo:”, error);
}
}