Message handler on button is disabled when button is not enabled

We've found the availability of tooltips on touch screens quite useful for some things and recently added a pseudo background dismiss by sending a message from clicks on root that is received by components with tips and clears their tooltips. It works great, except disabled buttons ignore the message.

We can put this script on the button's parent (editing reference to button child) and it works to remove the button tip while button is not enabled. But this script on the button does not work when button is not enabled:

Is disabling message handlers on disabled buttons intentional or a bug?


Could you not setup an expression binding on the tooltip text to be blank if the button is not enabled instead of using message handlers? Seems like it may be much simpler to manage.

if(this.custom.props.enabled,"My Tooltip Text","")

It also seems that if your message handler name is generic like "remove-tooltip" all buttons with this generic message handler in your page scope will receive and react to a message from a single button message even if it is not from the respective button.


Yes, this is the goal (dismiss all tooltips when background is tapped) and it works. The surprise was to find that message handlers on buttons are apparently disabled when buttonComponent.enable is not true.

Our application is displaying sensor IDs and names in a tooltip when tapped on touch screens as well as showing interlocks preventing action when hand controls are tapped. Operators like it, but noted sometimes they want to get the tip out of the way immediately. Now they can tap anywhere else and tips are dismissed. Our problem is solved, but it seems like message handlers probably should not be disabled on a button component just because the button is not enabled.

Ahh, I see what you’re doing. I like the idea!

1 Like

I was unable to replicate this in 8.1.23 (I just happened to have this version up at the time). I've attached the resource I used to test the following scenario:

  1. Request the Target button display a tooltip.
  2. Disable the Target button.
  3. Request the Target button remove its tooltip.

Please examine the View resource and identify what I have done differently from your resource (aside from names of scripts, obviously) and then reply here.

Note: I also tested on the button while it was disabled for the entire test and the message handlers continued to operate as if the button was enabled. (6.3 KB)

1 Like

Thanks for looking at this. I'm sorry for the false alarm. Looking at this again today I realized my working message handler (on parent) was "remove-tooltips" while the one that didn't work on buttons was "remove-tooltip" (missing final s). We are sending a "remove-tooltips" message from tap on background.

1 Like