Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Fix target=_blank bug #146

Merged
merged 1 commit into from
Dec 1, 2020
Merged

Conversation

tugceakin
Copy link
Contributor

Expected
target=_blank attribute opens the linked document in a new window or tab

Actual
target=_blank doesn't change the behavior of the link.

A link with target=_blank was not opening in a new tab.
@tugceakin
Copy link
Contributor Author

@Paratron Could you review the PR?

@Paratron Paratron merged commit 4ac77da into Paratron:master Dec 1, 2020
@Paratron
Copy link
Owner

Paratron commented Dec 1, 2020

Merged! Interesting that no one catched this before :D
Thanks for the fix :)

@tugceakin
Copy link
Contributor Author

Thank you 🙏

@ogazitt
Copy link

ogazitt commented Dec 21, 2020

This commit introduces a syntax error (two close parens) on line Link.js:22.

ogazitt added a commit to ogazitt/hookrouter that referenced this pull request Dec 21, 2020
A previous commit (linked to Paratron#146) inserted an extra ')' to close the if statement, leading to a syntax error.  This very simple commit fixes it.
@@ -19,7 +19,7 @@ import {navigate, getBasepath} from "./router";
*/
export const setLinkProps = (props) => {
const onClick = (e) => {
if (!e.shiftKey && !e.ctrlKey && !e.altKey) {
if (!e.shiftKey && !e.ctrlKey && !e.altKey && props.target !== "_blank")) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tugceakin Seems like you accidentally added an extra closing parantheses here ).

@Paratron I have a PR that also fixes this: #152

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Paratron @prageeth the PR I put in #148 already fixes this - all it needs is to be merged by @Paratron :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ogazitt Sorry I should have looked around. I only noticed it when i was fixing my issue with the ForwardRefs in Material UI.

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.

4 participants