# Refresh ui-node

**URL:** <https://discourse.nodered.org/t/refresh-ui-node/13921>\
**Category:** Dashboard\
**Created:** [2 August 2019 09:16 UTC](https://discourse.nodered.org/t/refresh-ui-node/13921 "2019-08-02T09:16:49Z")\
**Posts on this page:** 1\
**Showing post:** 24

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [5 October 2019 21:35 UTC](https://discourse.nodered.org/t/refresh-ui-node/13921/24 "2019-10-05T21:35:27Z")

</div>

> [@hotNipi](#):
>
> As you can not ignore first message always (it may be correct message) make your own first message

Hey @Steve-Mcl,  
I think we should give @hotNipi the Node-RED award for creativity this week 😉 Very simple workaround, so I got to love it ...

On the other hand, it is so pitty that we cannot handle this kind of stuff in the dashboard code (so all contributions could benefit from a standard solution). Did some debugging and I was almost close, but no sigar:

- As soon as an input message arrives, that input message is being stored (with the node id as key) in `replayMessages`:

- Immediately afterwards the '_ui-replay-state_' event is triggered, and the handler will get the message (for this node id from `replayMessages`) and send it to the browser:

- But when I **deploy** my flow, I again arrive in the same event handler. So the same message will be send to the browser here, _ **which is not what I want.** _👎

I don't see any way to avoid the ui-replay-state event being triggered, so I tried if I could remove the message from the `replayMessages` variable. When we call `addWidget` in our node, and I debug into that function I see that the `replayMessages` is indeed available in the ui.js:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/a/aca442979fdef96deac42f30e825c11a12587047.png)

When I execute (inside the `add` function) the following in my Chrome debugger console:

```auto
delete replayMessages[opt.node.id];

```

Then the event handler has no message to send to the browser (for the current node id), so no contextmenu appears, so problem solved.

@dceejay: is there any way we can access the `replayMessages` variable from our node (just before we call `addWidget`)? Here my Javascript knowledge suddenly ends ...

---

_[View the full topic](https://discourse.nodered.org/t/refresh-ui-node/13921)._
