# Disabled button but it still working

**URL:** <https://forum.inductiveautomation.com/t/disabled-button-but-it-still-working/35313>\
**Category:** Ignition\
**Created:** [June 4, 2020, 12:29am UTC](https://forum.inductiveautomation.com/t/disabled-button-but-it-still-working/35313 "2020-06-04T00:29:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauricio.salazar.urr](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@mauricio.salazar.urr](https://forum.inductiveautomation.com/u/mauricio.salazar.urr)\
**Post date:** [June 4, 2020, 12:29am UTC](https://forum.inductiveautomation.com/t/disabled-button-but-it-still-working/35313/1 "2020-06-04T00:29:22Z")

</div>

I need to disable the buttons, but when this property is on it just changes the background color and the button still works. Do you know what the problem may be?

I am using version 7.9.8

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [June 4, 2020, 3:27am UTC](https://forum.inductiveautomation.com/t/disabled-button-but-it-still-working/35313/2 "2020-06-04T03:27:08Z")

</div>

Do you have your script in the button action or button mouse pressed?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 4, 2020, 7:17am UTC](https://forum.inductiveautomation.com/t/disabled-button-but-it-still-working/35313/3 "2020-06-04T07:17:31Z")

</div>

Enabled only affects the ~~onClicked~~ actionPerformed action, the other mouse event handlers will still run, as @jpark alluded to. Either move your script to the ~~onClicked~~ actionPerformed event, or add a condition that checks the enabled property first

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 4, 2020, 12:32pm UTC](https://forum.inductiveautomation.com/t/disabled-button-but-it-still-working/35313/4 "2020-06-04T12:32:50Z")

</div>

> [@nminchin](#):
>
> Enabled only affects the onClicked action

Are you sure it blocks onClicked? I thought enabled/disabled only affected `actionPerformed`.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 4, 2020, 3:38pm UTC](https://forum.inductiveautomation.com/t/disabled-button-but-it-still-working/35313/5 "2020-06-04T15:38:08Z")

</div>

😳 whoops, yep that was my bad!
