# Repeated SVG Events

**URL:** <https://discourse.nodered.org/t/repeated-svg-events/79460>\
**Category:** Dashboard\
**Created:** [28 June 2023 08:59 UTC](https://discourse.nodered.org/t/repeated-svg-events/79460 "2023-06-28T08:59:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kitkat159](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kitkat159/32/66066_2.png) [@kitkat159](https://discourse.nodered.org/u/kitkat159)\
**Post date:** [28 June 2023 08:59 UTC](https://discourse.nodered.org/t/repeated-svg-events/79460/1 "2023-06-28T08:59:23Z")

</div>

Hello there,

I have the following issue.

I made a dashboard with a clickable SVG using [node-red-contrib-ui-svg](https://flows.nodered.org/node/node-red-contrib-ui-svg). On a click-event, I want to display a pop-up using the ui\_toast node.

Here's a simplified flow from my application:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/e/6efd20c604426f1f58cfe7e8deda0b2f3845f6d9.png)

> **Flow JSON**
>
> ```auto
> [
> {
> "id": "f6f2187d.f17ca8",
> "type": "tab",
> "label": "Flow 1",
> "disabled": false,
> "info": ""
> },
> {
> "id": "0cd043815f989f22",
> "type": "ui_svg_graphics",
> "z": "f6f2187d.f17ca8",
> "group": "0d4b39adc2d92623",
> "order": 0,
> "width": 0,
> "height": 0,
> "svgString": "<svg x=\"0\" y=\"0\" height=\"100\" viewBox=\"0 0 100 100\" width=\"100\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n<!-- Add here your SVG shapes (circles, rectangles, ...) -->\n<rect x=\"25\" y=\"25\" width=\"50\" height=\"50\" id=\"click_id\"></rect>\n<!-- Or remove everything, if you want to paste an entire drawing (<svg...>...</svg>).-->\n</svg>",
> "clickableShapes": [
> {
> "targetId": "#click_id",
> "action": "click",
> "payload": "#click_id",
> "payloadType": "str",
> "topic": "#click_id"
> }
> ],
> "javascriptHandlers": [],
> "smilAnimations": [],
> "bindings": [],
> "showCoordinates": false,
> "autoFormatAfterEdit": false,
> "showBrowserErrors": false,
> "showBrowserEvents": false,
> "enableJsDebugging": false,
> "sendMsgWhenLoaded": false,
> "noClickWhenDblClick": false,
> "outputField": "payload",
> "editorUrl": "//drawsvg.org/drawsvg.html",
> "directory": "",
> "panning": "disabled",
> "zooming": "disabled",
> "panOnlyWhenZoomed": false,
> "doubleClickZoomEnabled": false,
> "mouseWheelZoomEnabled": false,
> "dblClickZoomPercentage": 150,
> "cssString": "div.ui-svg svg{\n color: var(--nr-dashboard-widgetColor);\n fill: currentColor !important;\n}\ndiv.ui-svg path {\n fill: inherit;\n}",
> "name": "",
> "x": 460,
> "y": 300,
> "wires": [
> [
> "2635e838036cfe73",
> "a3d581744547d4e2"
> ]
> ]
> },
> {
> "id": "a3d581744547d4e2",
> "type": "debug",
> "z": "f6f2187d.f17ca8",
> "name": "debug 1",
> "active": true,
> "tosidebar": true,
> "console": false,
> "tostatus": false,
> "complete": "false",
> "statusVal": "",
> "statusType": "auto",
> "x": 660,
> "y": 300,
> "wires": []
> },
> {
> "id": "2635e838036cfe73",
> "type": "ui_toast",
> "z": "f6f2187d.f17ca8",
> "position": "dialog",
> "displayTime": "3",
> "highlight": "",
> "sendall": true,
> "outputs": 1,
> "ok": "OK",
> "cancel": "Cancel",
> "raw": false,
> "className": "",
> "topic": "",
> "name": "",
> "x": 650,
> "y": 360,
> "wires": [
> []
> ]
> },
> {
> "id": "0d4b39adc2d92623",
> "type": "ui_group",
> "name": "Standard",
> "tab": "50168646b59b7f97",
> "order": 1,
> "disp": true,
> "width": "6",
> "collapse": false,
> "className": ""
> },
> {
> "id": "50168646b59b7f97",
> "type": "ui_tab",
> "name": "Home",
> "icon": "dashboard",
> "disabled": false,
> "hidden": false
> }
> ]
> 
> ```

When I open the dashboard in two tabs (one in the background) and I click the SVG element to open the pop-up, the pop-up gets repeated when I open the second tab. It repeats as often as I clicked to open the pop-up.

In the console, only the clicking events are logged (not repeating).

Is there a possbility to not repeat the pop-up?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [29 June 2023 00:24 UTC](https://discourse.nodered.org/t/repeated-svg-events/79460/2 "2023-06-29T00:24:34Z")

</div>

In the notification node there is an option " Send to all browser sessions" make sure that it not ticked.

---

<div class="post-metadata">

**Author:** ![kitkat159](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kitkat159/32/66066_2.png) [@kitkat159](https://discourse.nodered.org/u/kitkat159)\
**Post date:** [29 June 2023 05:37 UTC](https://discourse.nodered.org/t/repeated-svg-events/79460/3 "2023-06-29T05:37:54Z")

</div>

Oh, I missed that. Thank you very much!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 July 2023 05:38 UTC](https://discourse.nodered.org/t/repeated-svg-events/79460/4 "2023-07-13T05:38:44Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
