Per the thread, the issue is not the input event itself, but using it in conjunction with sp-slider (or other similar controls) while calling executeAsModal inside the event handler. executeAsModal was throwing because it thought Ps was in a modal state not already created by the plugin. PS 23.4 will address that issue.
input events that don’t use executeAsModal are fine wherever they are. Further, for keyboard events, executeAsModal is safe inside of event handlers – (see following code) – just that for 23.3 you should avoid them whenever the mouse button might be down (or catch the resulting error).
const exeModal = require('photoshop').core.executeAsModal;
const batchPlay = require("photoshop").action.batchPlay;
const setTest = async function (value) {
try {
await exeModal(() => {
/* if this were a sp-slider, this wouldn't be logged, because
executeAsModal would throw. */
console.log("hi");
}, {});
} catch (e) {
console.error(e)
}
};
/* assumes <sp-textfield id="testInput"></sp-textfield> in the HTML */
document.getElementById("testInput").addEventListener('input', async (evt) => {
await setTest(evt.target.value);
});
I just tested the above in Ps 23.3, and executeAsModal works just fine as part of an input event from sp-textfield. It will fail when called from sp-slider because the mouse button has put Ps into a modal state. But keyboard events don’t have the same result.
TL;DR: You can use input events on sp-textfield in Ps 23.x.