question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mermaid click events

See original GitHub issue

Mermaid click events (often used for hyperlinking) do not currently work. The fix is simple. Add this line:

bindEvents(diagramContainer[0]);

right after diagramContainer.html(...) gets called in updateDiagram.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jdbranhamcommented, Jul 6, 2019

This works now, but I’m not sure which version fixed it - so unable to link here.

1reaction
njmikecommented, Nov 16, 2017

I’m experiencing the same behavior - clicking on a link that should be embedded by valid Mermaid syntax does not respond.

I’ve got Diagram 1.4.0 installed on Grafana v4.5.2

Using example from: https://mermaidjs.github.io/flowchart.html graph LR; A–>B; click A callback “Tooltip for a callback” click B “http://www.github.com” “This is a tooltip for a link”

Works in the live editor: https://mermaidjs.github.io/mermaid-live-editor/

But not in the diagram plugin.

Thank you in advance, for your time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Click events not firing on v2.8.3 · Issue #901 · mermaid-js ...
Describe the bug Click events on a simple mermaid graph do not fire in v2.8.3. I have attached the full web page, but...
Read more >
Mermaid | Diagramming and charting tool
JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically.
Read more >
Event on node not calling the function when using ...
I'm trying to render dynamic charts and therefore need to use the mermaid.render function. But using click does not work when the code...
Read more >
Mermaid diagrams & Javascript handlers - Features
I was going through the features Mermaid offers, and I noticed the interaction section where they discuss adding Javascript callbacks to nodes ...
Read more >
mermaid - Generation of diagrams and flowcharts from text ...
It is possible to bind a click event to a node, the click can lead to either a javascript callback or to a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found