I'm using Node-RED with the node-red-dashboard module (v2.4.2) but it's not very customisable, so I've used the dashboard node "template" to add my CSS and JS into the head. It works, but my dashboard have several tabs and when I choose another tab, the dashboard UI load the content but the widget are not working unless I manually refresh the page. It's like if it was correctly loaded but when I change of tab, only the widgets are reloaded and not the JS so a fatal error occurred. When I look into the source page code, my code is correctly there and after changing of tab, only the comments are there but the files are not loaded anymore (see pictures).
Does anybody already had that problem?
Fun fact, when I only put the CSS, it's correctly loaded everywhere and it's not my JS who's buggy, because my script.js file is empty right now.
I have no idea why is this so, but the solution has been to directly write the JS in tags and to keep the CSS with an external link.