# Msg replayed in UI node after a tab switch

**URL:** <https://discourse.nodered.org/t/msg-replayed-in-ui-node-after-a-tab-switch/25032>\
**Category:** Developing Nodes\
**Created:** [17 April 2020 20:03 UTC](https://discourse.nodered.org/t/msg-replayed-in-ui-node-after-a-tab-switch/25032 "2020-04-17T20:03:49Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [1 May 2020 08:42 UTC](https://discourse.nodered.org/t/msg-replayed-in-ui-node-after-a-tab-switch/25032/5 "2020-05-01T08:42:03Z")

</div>

Hi @BartButenaers .

I cant figure it out either but adding this slight hack seems to contain it...

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/e/deefd3fbc35bd3752cc5f9337791834e65249f02.png)

```auto
if(msg._ui_cm_already_seen){
  console.log("ui_context_menu: msg already seen - exiting!")
  return;
}
msg._ui_cm_already_seen = true;

```

---

_[View the full topic](https://discourse.nodered.org/t/msg-replayed-in-ui-node-after-a-tab-switch/25032)._
