# Perspective onActionPerformed vs onClick

**URL:** <https://forum.inductiveautomation.com/t/perspective-onactionperformed-vs-onclick/39469>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [October 7, 2020, 5:34pm UTC](https://forum.inductiveautomation.com/t/perspective-onactionperformed-vs-onclick/39469 "2020-10-07T17:34:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [October 7, 2020, 5:34pm UTC](https://forum.inductiveautomation.com/t/perspective-onactionperformed-vs-onclick/39469/1 "2020-10-07T17:34:05Z")

</div>

What is the main difference in these events? I’ve been using onActionPerformed. But, noticed is some sample projects users were using onClick.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 7, 2020, 9:07pm UTC](https://forum.inductiveautomation.com/t/perspective-onactionperformed-vs-onclick/39469/2 "2020-10-07T21:07:19Z")

</div>

`onClick` only captures clicks. `onActionPerformed` will fire whenever the button is fired (whether it’s triggered by a click or a keypress) _and_ `onActionPerformed` is also ‘aware’ of the enabled state of the component.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [October 8, 2020, 9:40pm UTC](https://forum.inductiveautomation.com/t/perspective-onactionperformed-vs-onclick/39469/3 "2020-10-08T21:40:58Z")

</div>

Thanks Paul

---

<div class="post-metadata">

**Author:** ![Marek\_Uhlir](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@Marek\_Uhlir](https://forum.inductiveautomation.com/u/Marek_Uhlir)\
**Post date:** [May 21, 2026, 1:29pm UTC](https://forum.inductiveautomation.com/t/perspective-onactionperformed-vs-onclick/39469/4 "2026-05-21T13:29:02Z")

</div>

Just a quick note from testing this in Ignition 8.1.

When a Perspective Button has props.enabled = false, it completely prevents interaction with the button. In my test, onClick was not triggered either by mouse click or by keyboard interaction.

However, when the button is enabled, onClick can also be triggered from the keyboard using Tab + Enter, not only by mouse click.

So in 8.1, I would not describe onClick as ignoring the enabled state. Disabled still blocks it.
