Text selected and lost of first space in textfield and textarea after PS 22.5 Update

Hi All,

This may well be a problem with my code but since Photoshop was updated to 22.5 I’ve been having problems with text input in my plugin. When I have multiple fields one after another, the first field works fine, but then when I start to enter text in the following field, as soon as I hit space for the first time the text gets selected, and if I continue to type I lose the first word and the space. If I deselect the text that was automatically selected using the right arrow key on my keyboard, I can continue to type, with spaces, and the text is fine. It’s just the first space in the second field I type into in the plugin.

It was working find until PS 22.5, and I’ve spent the last three days trying to find the reason, a solution or a workaround, and I’m coming up blank. Here’s a screenshot of what happens when I hit that first space in the second text field. This also happens if I make the second text field a text area.

I’ve tried all kind of different ways to get the output from the textfield, and nothing I’ve tried makes any difference. Right now I’m using the following code.

  document.querySelector("#presetDescInput").addEventListener('input', evt => {
    tempDesc = evt.target.value;
  })

  document.querySelector("#presetDescInput").addEventListener('change', evt => {
    tempDesc = evt.target.value;
  })

I also tried removing the input event capture and just using the change event, but the issue still occurs.

If anyone has seen this and has a solution or knows a possible cause, I’d really appreciate your feedback. Also, if anyone has multiple text fields in your plugin, please try this scenario in Photoshop 22.5 to check that this is not a generic problem.

Regards,
Martin Bailey.

I can replicate this on my machine. Looking into the cause, but I don’t think you’ll be able to work around it w/ input or change events. Thinking of potential workarounds now…

Thanks for checking and letting me know. I’ll stop looking on my end for now. Look forward to hearing how to overcome this in due course.

Try <sp-textfield quiet>seems to be better behaved on my machine, but worth checking on yours.

(Note that quiet fields do have a different appearance.)

Thanks Kerri! That works fine.

It looks strange to have a mix of quiet and regular fields, but out of 23 text fields only four accept spaces, so I’ll change these four for now, and hopefully be able to remove the “quiet” markup when things get back to normal.

And, if you’re on Windows, don’t even think about hitting the backspace key when your typing in a text field or you’ll start deleting layers on the Layers panel. I’m not sure which problem is more serious. I guess disappearing text when clicking the space bar is somewhat obvious if you’re watching what you’re typing, while losing a layer can go almost unnoticed but could end up being more consequential to the document.

I want to add that I am having this issue as well, but with XD as opposed to Photoshop, and adding quiet solved it temporarily. Is it possible to get a fix for this in a future release?