Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links clicked from previews inside of MarkdownEditor open in both working and new tab #2717

Closed
marywhite opened this issue Dec 20, 2022 · 0 comments · Fixed by #2718
Closed
Labels
bug Something isn't working react

Comments

@marywhite
Copy link
Contributor

Description

When using the a preview is rendered inside of the MarkdownEditor component, the MarkdownViewer component is rendered with a supplied openLinksInNewTab prop.

Because the default link behavior is not prevented, clicking these links has the consequence of opening the link inside of the current tab and new tab.

Video of clicking the preview button with renderPreview hardcoded to return a link:

link-navigation-before.mov

Steps to reproduce

  1. Go to https://primer.style/react/drafts/MarkdownViewer
  2. Add openLinksInNewTab to example code
  3. Click on link in preview
  4. Observe that browser navigation has occurred in new and current tab

Version

v35.16.0

Browser

Chrome

@marywhite marywhite added the bug Something isn't working label Dec 20, 2022
@siddharthkp siddharthkp added 💓collab a vibrant hub of collaboration and removed 💓collab a vibrant hub of collaboration labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working react
Projects
None yet
3 participants