I’ve seen an issue with the spacebar and enter key triggering buttons in UXP plugins. I’m not using any key events and they shouldn’t be triggering buttons. For sp button, it will trigger the last button used. For native HTML buttons, it will trigger the button in the case where you started to click the button before but then changed your mind and pulled the mouse away.
The space bar seems to trigger on key up. The enter key seems to trigger on key down. I have seen this in multiple plugins and I don’t believe there is anything wrong with the plugin coding to cause this.
I made a video to help better show the issue.