mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
68.69k stars 6.07k forks source link

Rendered node with click _blank interaction does not open link in new tab #5550

Open chrycheng opened 1 month ago

chrycheng commented 1 month ago

Description

The graph produced by the following input is supposed to have a node which when clicked should cause the browser to open the associated link in a new tab. The link does open but it's in the same tab that's currently displaying the graph.

graph
a
click a "https://www.google.com" _blank

Steps to reproduce

  1. Save the Mermaid code in the Description into a file
  2. Render it into an SVG (e.g.,. mmdc -e svg -i in.mmd)
  3. Open the output SVG in a browser
  4. Click on the a node
  5. Observe that https://www.google.com opens in the same tab displaying the SVG

Screenshots

No response

Code Sample

graph
a
click a "https://www.google.com" _blank

Setup

Suggested Solutions

No response

Additional Context

No response