Skip to content

Conversation

sgoll
Copy link
Contributor

@sgoll sgoll commented Oct 8, 2015

This pull request adds the ability to open links in new windows or tabs (or frames or browsing contexts in HTML5), using the target attribute of the <a> tag. Basically, if target is set, we let the browser handle the transition itself (similarly to when we middle-click on a link to open it in a new tab).

See #1510 and #2188 for more discussions about this requirement.

@knowbody
Copy link
Contributor

knowbody commented Oct 8, 2015

@sgoll mind adding tests for that?

@mjackson
Copy link
Member

mjackson commented Oct 9, 2015

I'm not sure this is actually testable in our current testing stack. Our tests all run in a single tab, so testing that another tab was actually opened isn't an option.

@sgoll Thanks for the PR :)

mjackson added a commit that referenced this pull request Oct 9, 2015
Ability to open links in new window/tab, using target="_blank"
@mjackson mjackson merged commit e9067ff into remix-run:master Oct 9, 2015
@remix-run remix-run deleted a comment from nazreen Sep 10, 2017
@aberba
Copy link

aberba commented Dec 15, 2017

Hello. I still have this issue in version "react-router-dom": "^4.2.2",. What's up? <Link to="example.com" target="_blank"... doesn't work. Neither does the tag itself.

@pshrmn
Copy link
Contributor

pshrmn commented Dec 15, 2017

@aberba <Link>s are for internal navigation. If you want to link to an external site, you need to use an anchor.

Also, in the future please ask questions on StackOverflow or Reactiflux as those are better suited for answering questions.

@Aagbator

This comment has been minimized.

@remix-run remix-run locked and limited conversation to collaborators Aug 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants