Deactivated buttons still receiving click events

Is there any reason a deactivated button should still be getting click events? The documentation seems to indicate that this shouldn’t be happening.

I set up the event handler like this:
this.entity.element.on('click', this.onClick, this);

I have had to include the following conditional in my ‘onClick’ function:
if(this.entity.button && { }

I can tell that the buttons are inactive because they are using the “inactive tint” color. Yet, I can still click on them, triggering my onClick handler.

This is happening in Chrome, Windows 10, with just a mouse.

Do you have project that showcases this issue?

Edit: Oh wait, you should be listening to the button click event:

this.entity.button.on('click', this.onClick, this);

Aha! I must have gotten that from some old tutorial code, or something. I’ll make that change.

Yup, that seems to have done the trick! Thanks!

I think I got that code from “btn-states.js” in one of the tutorials.