Weird behaviour of notification node

I have a weird issue with notification node in "show dialog" mode. It's easy to test with two inject nodes (timestamp and empty string), a "show dialog" with OK/Cancel and a debug node.

If the timestamp is injected for the first time and user picks an option it works as it should.

If the timestamp is injected and dismissed by an empty string the debug shows "OK" being pressed twice in the same second (with no user action).

If timestamp is injected and another one is injected when the dialog is still active the debug shows "Cancel" being pressed twice (with no user action).

When two "show dialog" nodes are present on the flow and used repeatedly (let's say OK/Cancel and Yes/No) sometimes pressing OK gives Yes on the debug etc.

These below are produced with no user interaction with the dashboard, only timestamp and empty string nodes

9.12.2019, 22:16:13node: 9f7ee7ad.3e151msg.payload : string[2]
9.12.2019, 22:16:13node: 9f7ee7ad.3e151msg.payload : string[2]
9.12.2019, 22:16:19node: 9f7ee7ad.3e151msg.payload : string[6]
9.12.2019, 22:16:19node: 9f7ee7ad.3e151msg.payload : string[6]

In this example "OK" was an user action, "Cancel" appeared when another timestamp was injected:

9.12.2019, 22:19:49node: 9f7ee7ad.3e151msg.payload : string[2]
9.12.2019, 22:19:56node: 9f7ee7ad.3e151msg.payload : string[6]

Can you please confirm this behavior as it makes the node pretty much useless in my case?

Hi @Darkdude.

Someone is going to say it, and so I may as well.

You will need to post the flow.

To post the flow, select the nodes and export them to the clipboard.

In here, when ready to post the code, prefix the code with three ` symbols. (Just to the left of the number 1 key)
Paste the code, then put another 3 of them.

That will help a lot for people wanting to read the code and look at it better.


Furthermore, while you’re on it can you confirm the versions and platform you’re using? So node-red version, nodejs version, node-red-dashboard version, the platform/operating system you run on. In the case of a problem, these can be used to both verify the issue, and see if it happens under different circumstances too.


The flow I'm using is this one:


As for software I run Node Red from a docker container, so it's v1.0.3 of Node Red and v2.19.2 of Dashboard.

There is only one instance of popup. So any new messages will have an effect on existing ones.
If a new one arrives when an existing one is active it will send cancel as in effect that is what has happened - you have to dismiss the first in order to see the second and you can't assume it's an OK as no human has clicked a positive acknowledgment.
The blank sending OK may indeed be a bug as that should send Cancel as well.

Thanks as always, dceejay

Now I understand how the popup works a little better. Still, an empty string always result in "OK" on my setup.

That is currently correct. I will fix it to return Cancel to be more consistent and correct.

Pushed to master branch.