Uui-button in waiting state: should you be able to click it?

Before I decide if I want to create an issue on the tracker, I was wondering what the indended behaviour of a uui-button is. I have an extension and when I press the button, I set it in the ‘waiting’ state. It will correctly show the ‘loading circle’ animation. However, I can still click the button and it still fires onclick events. That does not really make sense to me. Sure I could disable it, ben then the button would completely change it’s appearance.

So is this a bug, or is it by design? I think it should not be clickable when in waiting state. Or I’m doing something wrong, although in this case, I don’t see what I can do wrong here :wink:

Interesting, I don’t think my brain has ever let me click a button that’s in a loading state!

Looking at a completely random example in the core, there’s no checks on the button state in the handler to see if there’s already a call happening. I’d think that if you’re saying you can still fire the handler when the state is waiting, then that sounds like a bug.

If memory serves, was there not also a disabled attribute to set against the button too?