[Announce] node-red-contrib-ui-contextmenu

I'm in no rush :wink: - I'm using a ui-dropdown node in the meantime, but it's a bit ugly!

For info, my node-RED is script installed

  • Node-RED version: v1.0.3
  • Node.js version: v10.19.0
  • Dashboard version 2.19.4
  • Oracle Linux 4.14.35

But other than adding adminAuth & httpNodeAuth, it's a vanilla installation, so assume others with NR security enabled would have the same problem.

I don't know if it helps, but I've just removed all the security settings in node-RED, and the contextmenu node functions without errors.

Adding them back, it appears that when httpNodeAuth is enabled, that is what causes the 401 error messages.

1 Like

Could it be possibly related to the (unsolved) situation seen here?

Hi Lena,
When I set the httpNodeAuth in my settings.js file, it also fails for me. I'm now trying to debug it. Below is the call stack of my endpoint (i.e. the happy path), in case the httpNodeAuth is not activated:

So somewhere in between it fails to access the endpoint...

If I can find a moment tomorrow I’ll compare the uibuilder stack with this one. See where it goes out on both... I’m curious for sure what’s causing this


For my issue, this has now been resolved. see Node-red-ui-table fails when httpNodeAuth enabled


Hi Bart, Hi Steve,

I just observed a strange thing. When I do a page refresh in chrome 80.0.3987.122 (64-Bit) on windows 10 (not tested elsewhere) my two context menus pops up on the last position they where used:

perhaps it has something to do with the dashboard replaying the last message when a session connects, because no message is triggering this (checked with debug nodes). Timers are not started / working, only after I hovered over the menus once.

I'm using Node-RED 1.0.3 and dashboard 2.19.4 on windows 10.

BTW: It`s always the last position where it was triggered the last time:

I have the same on Ios, when I change to a tab that contains context menus all context menus I used the last time I was on the tab are displayed until i either tap them away or do a refresh with ui control.

Last week I have created a new version of the contextmenu node, which should have solved that issue ( in combination with dashboard 0.19.4 or above). You are using the latest contextmenu node version?

You can find more details about the solution here.

1 Like

Is there anyway the menu can always be on the uppermost layer.


Can't that be done (@BartButenaers) by adding a ridiculously high z-index on the css?

Hi Paul,
Indeed like @afelix says the z-index could solve it. However I had some problems with that in the past, in combination with other style elements (e.g. position)...

But let's try.... I have added it on the surrounding DIV element:

<div id='div_" + node.config.id + "' style='z-index: 999999;' ...

You can install it directly from my Github repository:

npm install bartbutenaers/node-red-contrib-ui-contextmenu
[opc@digitalnut .node-red]$ npm install bartbutenaers/node-red-contrib-ui-contextmenu
npm WARN Master_flow@0.0.1 No repository field.
npm WARN Master_flow@0.0.1 No license field.

+ node-red-contrib-ui-contextmenu@1.0.9
updated 1 package and audited 1250 packages in 13.621s

15 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Still the same I'm afraid in incognito browser.

@BartButenaers @Paul-Reed, coming back to the issue from this last weekend for a moment... Bart, does your node add things to the appcache of the dashboard, or is it compiled/minified to it? Paul, can you try resetting it again through chrome://... like you did before and see if it changes anything?

No still the same Lena.

Okay, means I can trash that line of thought.

Hey Lena,
Not that I know. And I don't think my old partner @Steve-Mcl has added something like that...

Hi Paul,
Can you please share how you did the burger menu button. That would help me a lot.
Thank you.

It's just a ui-button with fa-navicon fa-2x added to the Icon property in the node's config.
The Label is left blank.

[{"id":"11664387.63fb8c","type":"ui_button","z":"c9c4eeb8.bad8e","name":"","group":"f93124ac.7c74c8","order":1,"width":2,"height":1,"passthru":false,"label":"","tooltip":"","color":"","bgcolor":"#2A2A2A","icon":"fa-navicon fa-2x","payload":"","payloadType":"str","topic":"","x":140,"y":280,"wires":[["9698471f.961b68"]]},{"id":"f93124ac.7c74c8","type":"ui_group","z":"","name":"Chart","tab":"6cb7ce21.162a1","order":1,"disp":true,"width":"22","collapse":false},{"id":"6cb7ce21.162a1","type":"ui_tab","z":"","name":"Realtime Power","icon":"dashboard","order":9,"disabled":false,"hidden":false}]

Thanks, I thought you found a way to determine the x and y coordinates for that button to feed into the context menu. That is what I`m desperately looking for:

A way to anchor a position on the dashboard (like a button, but could be a dummy too, which can deliver the coordinates. It would be perfect if the ui-button node issues the x,y, of the mouse and x1,y1,x2,y2 coordinates of the button area on every press somewhere hidden (msg.ui_control.x1) for example. Or a general upgrade to the ui-control node to emit x.y coordinates on every mouse press ("Output: mouse events") perhaps here:
Than would be "universal" solution and only there if needed.

To hum it may concern: "Is this an idea that could be realized? Sometimes?"