Input Fields and Command Space Beeping

I have an input field in my UXP plugin that is used to select layers by name.

If you enter text into the field and then press Command Space to zoom in and out on the document there is not problem.

If you click the Select button in the panel to run the command the text box looses focus as expected but if you then press Comand Space to zoom you get the short beep error sound.

You can see the same behavior when the image size dialog is open and you zoom with Command Space. But only when zooming down with Command Option Space.

Does anyone know if this can be avoided?

Thanks

could it be that the button have focus and I think space does submit/click active button. doesn’t it?

I’d try to give focus to a diferent element at the end of your code to see if that helps.